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::SPCcommsTCP Class Reference

#include <SPCcommsTCP.h>

Inheritance diagram for SecurePlayLibrary::SPCcommsTCP:

SecurePlayLibrary::SPCGenericCommsDriverClass SecurePlayLibrary::SPCcommsHTTP SecurePlayLibrary::SPCcommsTCPclient SecurePlayLibrary::SPCcommsTCPserver SecurePlayLibrary::SPCcommsHTTPclient SecurePlayLibrary::SPCcommsHTTPserver List of all members.

Public Member Functions

 SPCcommsTCP ()
 SPCcommsTCP (bool push, bool relay)
bool StartListen (int portIN)
void StopListen ()
bool isListen ()
bool setUniqueAddress (string address, InetAddress uniqueAddress)
bool unsetUniqueAddress (string address)
bool removeConnection (string address)
bool createConnection (string address, int portIN)
bool createConnection (string address, Socket socket)
bool prsend (string address, vector< SPbyte > messages)
string getCommsDriverType ()
bool isReady ()
int numConnections ()
bool containsUniqueAddress (InetAddress add)
string getAddress (InetAddress add)
int getListenerCount ()

Protected Attributes

SPMap socketConnections
SPMap uniqueAddress
bool listen
Vector listeners

Detailed Description

TCP comms class is an extention of a GenericCommsDriver class. This class supports TCP.
Author:
IT GlobalSecure
See also:
SecurePlay License Information


Constructor & Destructor Documentation

SPCcommsTCP::SPCcommsTCP  ) 
 

Constructor

SPCcommsTCP::SPCcommsTCP bool  push,
bool  relay
 


Member Function Documentation

bool SPCcommsTCP::containsUniqueAddress InetAddress  add  ) 
 

Checks to see if the unique address exists in this driver.

Parameters:
add InetAddress - address to be checked
Returns:
boolean

bool SPCcommsTCP::createConnection string  address,
Socket  socket
 

Creates a connection.

Parameters:
address String - address to which the connection will be created.
socket Socket - port number through which to send messages.
Returns:
boolean
Exceptions:
IOException 

Reimplemented in SecurePlayLibrary::SPCcommsHTTP, SecurePlayLibrary::SPCcommsHTTPclient, and SecurePlayLibrary::SPCcommsTCPclient.

bool SPCcommsTCP::createConnection string  address,
int  portIN
 

Creates a connection.

Parameters:
address String - address to which the connection will be created.
portIN int - port number through which to send messages.
Returns:
boolean
Exceptions:
IOException 

Reimplemented in SecurePlayLibrary::SPCcommsHTTP, SecurePlayLibrary::SPCcommsHTTPserver, and SecurePlayLibrary::SPCcommsTCPserver.

string SPCcommsTCP::getAddress InetAddress  add  ) 
 

Checks to see if the unique address exists in this driver.

Parameters:
add InetAddress - address to be checked
Returns:
String

string SPCcommsTCP::getCommsDriverType  ) 
 

This method returns the driver type. It will be overridden with specific driver type.

Returns:
String

Reimplemented from SecurePlayLibrary::SPCGenericCommsDriverClass.

Reimplemented in SecurePlayLibrary::SPCcommsHTTP, SecurePlayLibrary::SPCcommsHTTPclient, SecurePlayLibrary::SPCcommsHTTPserver, SecurePlayLibrary::SPCcommsTCPclient, and SecurePlayLibrary::SPCcommsTCPserver.

int SPCcommsTCP::getListenerCount  ) 
 

Returns the number of listeners this driver has.

Returns:
int

bool SPCcommsTCP::isListen  ) 
 

Returns the listener flag.

Returns:
boolean

bool SPCcommsTCP::isReady  ) 
 

Checks to see if every address has a unique address set.

Returns:
boolean

Reimplemented from SecurePlayLibrary::SPCGenericCommsDriverClass.

int SPCcommsTCP::numConnections  ) 
 

Returns number of connections available.

Returns:
int

bool SPCcommsTCP::prsend string  address,
vector< SPbyte >  messages
 

Sends the message.

Parameters:
address String - address that this message is sent to.
messages byte[] - message void

Reimplemented from SecurePlayLibrary::SPCGenericCommsDriverClass.

Reimplemented in SecurePlayLibrary::SPCcommsHTTPclient, and SecurePlayLibrary::SPCcommsHTTPserver.

bool SPCcommsTCP::removeConnection string  address  ) 
 

Removes the connection and closes the connection class.

Parameters:
address String - connection to be closed.
Returns:
boolean

Reimplemented in SecurePlayLibrary::SPCcommsHTTP.

bool SPCcommsTCP::setUniqueAddress string  address,
InetAddress  uniqueAddress
 

Sets a unique address and associates it with an address.

Parameters:
address String - address
uniqueAddress InetAddress - unique address that gets associated with the address.
Returns:
boolean

bool SPCcommsTCP::StartListen int  portIN  ) 
 

Start to listen. Creates a server socket listener.

Parameters:
portIN int - port it will listen to. void

Reimplemented in SecurePlayLibrary::SPCcommsHTTPclient, and SecurePlayLibrary::SPCcommsTCPclient.

void SPCcommsTCP::StopListen  ) 
 

Stops the listener by setting the listener flag to false. void

Reimplemented in SecurePlayLibrary::SPCcommsHTTPclient, and SecurePlayLibrary::SPCcommsTCPclient.

bool SPCcommsTCP::unsetUniqueAddress string  address  ) 
 

Unsets a unique address.

Parameters:
address String - address associated with the unique address.
Returns:
boolean


Member Data Documentation

bool SPCcommsTCP::listen [protected]
 

Flag to continue to listen to a port.

Vector SPCcommsTCP::listeners [protected]
 

Stores all the listeners that this driver has.

SPMap SPCcommsTCP::socketConnections [protected]
 

Map that contains all the connections this driver has made. map<address, SocketConnection>

SPMap SPCcommsTCP::uniqueAddress [protected]
 

Map that contains the common address that SPL uses and the unique address that TCP uses. map<address, uniqueAddress>


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.