#include <ISocket.h>
Inherits IInterface.
Inherited by IDataSocket, and IListenSocket.
Inheritance diagram for ISocket:
accessors | |
virtual void * | getEventTarget () const =0 |
Get event target. | |
static 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.
virtual void ISocket::bind | ( | const CNetworkAddress & | ) | [pure virtual] |
Bind socket to address.
Binds the socket to a particular address.
Implemented in CTCPListenSocket, CTCPSocket, IDataSocket, and IListenSocket.
virtual void ISocket::close | ( | ) | [pure virtual] |
Close socket.
Closes the socket. This should flush the output stream.
Implemented in CTCPListenSocket, CTCPSocket, IDataSocket, and IListenSocket.
CEvent::Type ISocket::getDisconnectedEvent | ( | ) | [static] |
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().
virtual void* ISocket::getEventTarget | ( | ) | const [pure virtual] |
Get event target.
Returns the event target for events generated by this socket.
Implemented in CTCPListenSocket, CTCPSocket, IDataSocket, and IListenSocket.