Public Types | |
enum | SERROR { SOCKET_OK = 0, SOCKET_WOULD_BLOCK = 10035L, SOCKET_IS_CONNECTED = 10056L, SOCKET_CONNECTION_ABORTED, SOCKET_OTHER_ERROR = -1 } |
Public Member Functions | |
ippSocket () | |
virtual | ~ippSocket () |
bool | Create () |
create a socket and returns true if the socket has been successfully created. | |
SERROR | Connect (const char *hostname, int port) |
connect to a server hostname on the specified port | |
void | Close () |
close the socket. | |
SERROR | Read (char *buffer, int size) |
SERROR | Write (const char *sendbuf) |
bool | Listen (int portNumber) |
ask the socket to listen on the specified port number | |
SERROR | Accept (ippSocket &socket) |
SERROR | CanSendData () |
bool | IsValid () const |
returns true if the socket has been created. | |
SERROR | Ping () |
probe the connection to see if the other peer has disconnected | |
Static Public Member Functions | |
static bool | Initialize () |
Protected Attributes | |
std::auto_ptr< ippSocketImp > | _imp |
Friends | |
class | ippSocketImp |
|
Definition at line 20 of file ippSocket.h. |
|
Definition at line 90 of file ippSocket.cpp. |
|
Definition at line 97 of file ippSocket.cpp. References Close(). |
|
Accept a incoming connection Accept is used by a listening socket to make a attempt Definition at line 519 of file ippSocket.cpp. References _imp. Referenced by ippSpyServer::PerformListening(). |
|
Definition at line 163 of file ippSocket.cpp. References _imp. Referenced by ippSpyClient::HeartBeat(), and ippSimpleClient::HeartBeat(). |
|
close the socket. close the socket Definition at line 357 of file ippSocket.cpp. References _imp. Referenced by ippSpyClient::Connect(), ippSimpleClient::Connect(), ippSpyClient::Disconnect(), ippSimpleClient::Disconnect(), ippSpyClient::HeartBeat(), ippSimpleClient::HeartBeat(), ippSpyServer::PerformListening(), ippSpyServer::PowerOff(), ippSimpleServer::PowerOff(), ippEngine::ProbeConnection(), ippClientServerSpyTestCase::testSpy_with_uncompliant_client1(), ippEngine::~ippEngine(), and ~ippSocket(). |
|
connect to a server hostname on the specified port
Definition at line 121 of file ippSocket.cpp. References _imp, IPP_ASSERT, and IsValid(). Referenced by ippSpyClient::Connect(), ippSimpleClient::Connect(), and ippClientServerSpyTestCase::testSpy_with_uncompliant_client1(). |
|
create a socket and returns true if the socket has been successfully created. create a socket Definition at line 297 of file ippSocket.cpp. References _imp. Referenced by ippSpyClient::Connect(), ippSimpleClient::Connect(), and ippClientServerSpyTestCase::testSpy_with_uncompliant_client1(). |
|
Initialize the WinSock layer check the version of the Winsock on the computer and returns true if the version is fine Definition at line 404 of file ippSocket.cpp. Referenced by ippSimpleServer::ippSimpleServer(). |
|
returns true if the socket has been created. returns true if the socket is valid Definition at line 560 of file ippSocket.cpp. References _imp. Referenced by Connect(), ippSpyServer::PerformListening(), ippEngine::ProbeConnection(), and ippClientServerSpyTestCase::testSpy_with_uncompliant_client1(). |
|
ask the socket to listen on the specified port number method use to setup a Server listening socket Definition at line 429 of file ippSocket.cpp. References _imp. Referenced by ippSpyServer::OnConnectionLost(), ippSpyServer::PowerOn(), and ippSimpleServer::PowerOn(). |
|
probe the connection to see if the other peer has disconnected Ping verifying if the connection is still alive this method is useful to find out if a existing connection has not been broken expectantly returns no zero if the connection is broken Definition at line 382 of file ippSocket.cpp. References _imp. Referenced by ippEngine::ProbeConnection(). |
|
read some string from the socket
Definition at line 209 of file ippSocket.cpp. References _imp. |
|
write some string to the socket
Definition at line 246 of file ippSocket.cpp. References _imp. Referenced by ippSpyClient::SendCommand(), ippSimpleClient::SendCommand(), ippClientServerSpyTestCase::testSpy_with_uncompliant_client1(), and ippSpyServer::WriteToSocket(). |
|
Definition at line 86 of file ippSocket.h. |
|
Definition at line 83 of file ippSocket.h. Referenced by Accept(), CanSendData(), Close(), Connect(), Create(), IsValid(), Listen(), Ping(), Read(), and Write(). |