2006 Copyright Filed by IT GlobalSecure, Inc. All Rights Reserved. Not to be used without authorization by Author. SecurePlay, IT GlobalSecure, and IT Armor are registered trademarks by IT GlobalSecure, Inc. Software protected by software license, and one or more the following U.S. and International patent numbers: U.S. Patent 6,030,288, U.S. Patent 6,165,072, European Patent Office EP1016049A1,and World Intellectual Property Organization WO9912135C1 and additional filings worldwide.
Main Page | Class Hierarchy | Class List | Class Members

SecurePlayLibrary::SocketConnectionTCP Class Reference

#include <SocketConnectionTCP.h>

List of all members.

Public Member Functions

 SocketConnectionTCP (Socket s, SPCcommsTCP m)
 SocketConnectionTCP (InetAddress address, int port, SPCcommsTCP m)
void incoming (vector< SPbyte > mess)
void write (vector< SPbyte > data)
bool closeConnection ()


Detailed Description

This class represents a connection. It also spawns a listener class in a seperate thread that listens incoming messages. It is also used to send messages out. The reason for this class existence is that a connection can be stored in a map and grabbed to send messages whenever, while the listener it spawned listens to messages.
Author:
IT GlobalSecure
See also:
SecurePlay License Information


Constructor & Destructor Documentation

SocketConnectionTCP::SocketConnectionTCP Socket  s,
SPCcommsTCP  m
 

Constructor is used when a SocketServer recieves a connection and passes the socket to this class.

Parameters:
s Socket - connection recieved.
m SPCcommsTCP - TCP comms driver class that this connection associated to.
Exceptions:
IOException 

SocketConnectionTCP::SocketConnectionTCP InetAddress  address,
int  port,
SPCcommsTCP  m
 

Constructor is used when a connection needs to be created through a certain port.

Parameters:
address InetAddress - address of the connection.
port int - port number that the connection is created.
m SPCcommsTCP - TCP comms driver class that this connection associated to.
Exceptions:
IOException 


Member Function Documentation

bool SocketConnectionTCP::closeConnection  ) 
 

This method closes the connection and kills the thread that listens to incoming messages.

Exceptions:
IOException 

void SocketConnectionTCP::incoming vector< SPbyte >  mess  ) 
 

Passes incoming messages from listener to the main driver.

Parameters:
mess byte[] - incoming message to be processed

void SocketConnectionTCP::write vector< SPbyte >  data  ) 
 

This method writes messages to the connection.

Parameters:
data byte[] - messages to be written.
Exceptions:
IOException 


The documentation for this class was generated from the following files: 2006 Copyright Filed by IT GlobalSecure, Inc. All Rights Reserved. Not to be used without authorization by Author. SecurePlay, IT GlobalSecure, and IT Armor are registered trademarks by IT GlobalSecure, Inc. Software protected by software license, and one or more the following U.S. and International patent numbers: U.S. Patent 6,030,288, U.S. Patent 6,165,072, European Patent Office EP1016049A1,and World Intellectual Property Organization WO9912135C1 and additional filings worldwide.