#include <ISocket.h>
Inherits IInterface.
Inherited by IDataSocket, and IListenSocket.
Inheritance diagram for ISocket:
accessors | |
virtual void * | getEventTarget () const =0 |
Get event target. | |
CEvent::Type | getDisconnectedEvent () |
Get disconnected event type. | |
Public Member Functions | |
manipulators | |
virtual void | bind (const CNetworkAddress &)=0 |
Bind socket to address. | |
virtual void | close ()=0 |
Close socket. |
This interface defines the methods common to all network sockets. Generated events use this
as the target.
Definition at line 28 of file ISocket.h.
|
Bind socket to address. Binds the socket to a particular address. Implemented in CTCPListenSocket, CTCPSocket, IDataSocket, and IListenSocket. |
|
Close socket. Closes the socket. This should flush the output stream. Implemented in CTCPListenSocket, CTCPSocket, IDataSocket, and IListenSocket. |
|
Get disconnected event type. Returns the socket disconnected event type. A socket sends this event when the remote side of the socket has disconnected or shutdown both input and output. Definition at line 24 of file ISocket.cpp. References CEvent::registerTypeOnce(). Referenced by CTCPSocket::close(), and CTCPSocket::read(). |
|
Get event target. Returns the event target for events generated by this socket. Implemented in CTCPListenSocket, CTCPSocket, IDataSocket, and IListenSocket. |