Inheritance diagram for lfc::Socket::
Public Types | |||
enum | State { stOpen, stClosed } | ||
enum | Protocol { pfINET = pal::sockets::pfINET, pfUNIX = pal::sockets::pfUNIX, pfIPX = pal::sockets::pfIPX } | ||
available communications protocols. More... | |||
enum | SocketType { stStream = pal::sockets::stSTREAM, stDatagram = pal::sockets::stDGRAM } | ||
connection oriented or connectionless. More... | |||
enum | Flags { flagPeek = pal::sockets::flagPEEK, flagOOB = pal::sockets::flagOOB } | ||
peek and Out of Band flags. More... | |||
Public Methods | |||
Socket () throw () | |||
creates a Socket but doesn't connect it. More... | |||
Socket (string host, Word port, SocketType type=stStream) | |||
creates a Socket and connects it. More... | |||
Socket (string host, string service, SocketType type=stStream) | |||
creates a Socket and connects it. More... | |||
Socket (SocketServer &socketServer) | |||
creates this Socket from a SocketServer ( as a consequence of the SocketServer accepting a connection ). More... | |||
virtual | ~Socket () throw () | ||
cleans up. More... | |||
virtual char | pop () | ||
see class _Input. More... | |||
virtual bool | hasMore () const | ||
see class _Input. More... | |||
virtual long | read (char *buffer, long count, bool bWaitAll=true) | ||
see class _Input. More... | |||
virtual void | push (const char &value) | ||
see class _Output. More... | |||
virtual long | write (const char *buffer, long count, bool bWaitAll=true) | ||
see class _Output. More... | |||
virtual void | flush () | ||
see class _Output. More... | |||
virtual void | connect (string host, Word port, SocketType type=stStream) | ||
connects the Socket that calls it. More... | |||
virtual void | connect (string host, string service, SocketType type=stStream) | ||
connects the Socket that calls it. More... | |||
virtual void | accept (SocketServer &socketServer) | ||
this is complementary to the SocketServer& constructor. More... | |||
virtual void | close () | ||
closes the Socket that calls it
| |||
virtual long | readFrom (string &host, Word port, char *buffer, long count, bool bWaitAll=true) | ||
receives some UDP packets. More... | |||
virtual long | writeTo (string host, Word port, const char *buffer, long count, bool bWaitAll=true) | ||
sends some UDP packets. More... | |||
virtual void | setBlocking (bool bBlocking) | ||
the operations on this Socket will block or not. More... | |||
virtual State | state () const throw () | ||
whether this Socket is open or closed. More... | |||
Protected Methods | |||
virtual void | testState (State state, string location) const | ||
asserts that the current Socket state is the one we think it is. More... | |||
Protected Attributes | |||
pal::sockets::Handle | m_handle | ||
State | m_state | ||
current state of the Socket, see Socket::State. More... |
|
|
|
available communications protocols.
|
|
connection oriented or connectionless.
|
|
peek and Out of Band flags.
|
|
creates a Socket but doesn't connect it.
|
|
creates a Socket and connects it.
|
|
creates a Socket and connects it.
|
|
creates this Socket from a SocketServer ( as a consequence of the SocketServer accepting a connection ).
|
|
cleans up.
|
|
see class _Input.
Reimplemented from lfc::_Input. |
|
see class _Input.
Reimplemented from lfc::_Input. |
|
see class _Input.
|
|
see class _Output.
|
|
see class _Output.
|
|
see class _Output.
Reimplemented from lfc::_Output. |
|
connects the Socket that calls it.
|
|
connects the Socket that calls it.
|
|
this is complementary to the SocketServer& constructor.
|
|
closes the Socket that calls it
|
|
receives some UDP packets.
|
|
sends some UDP packets.
|
|
the operations on this Socket will block or not.
|
|
whether this Socket is open or closed.
|
|
asserts that the current Socket state is the one we think it is.
|
|
|
|
current state of the Socket, see Socket::State.
|