#include <senf/Socket/ProtocolClientSocketHandle.hh>
The ProtocolClientSocketHandle is the client interface leaf class of the handle hierarchy. This is the class to instantiate to open a new socket. This is also the only class, which can be used to open a client socket.
The Protocol template argument defines the protocol of the socket. This protocol provides the protocol interface of the socket as well as the complete socket policy of this protocol.
The ProtocolClientSocketHandle adds the protocol interface as an additional interface to the socket handle. This interface is only accessible via the protocol class. All socket functionality not available through the policy interface (see ClientSocketHandle) is accessible via the protocol() member.
Definition at line 62 of file ProtocolClientSocketHandle.hh.
Public Types |
|
typedef SocketProtocol | Protocol |
The sockets protocol. |
|
Public Member Functions |
|
Protocol & | protocol () |
Access the protocol interface. |
|
void | state (SocketStateMap &map, unsigned lod=0) |
Inquire state information of socket handle. |
|
std::string | dumpState (unsigned lod=0) |
Format complete state information as string. |
|
Static Public Member Functions |
|
static ProtocolClientSocketHandle | cast_static (FileHandle handle) |
static ProtocolClientSocketHandle | cast_dynamic (FileHandle handle) |
Structors and default members |
|
ProtocolClientSocketHandle () | |
Create new client socket. |
|
ProtocolClientSocketHandle (senf::NoInit_t) | |
Create uninitialized socket variable. |
|
Protected Member Functions |
|
ProtocolClientSocketHandle (FileHandle other, bool isChecked) |
typedef SocketProtocol senf::ProtocolClientSocketHandle< SocketProtocol >:: | ||||
Protocol | ||||
The sockets protocol.
Definition at line 69 of file ProtocolClientSocketHandle.hh.
senf::ProtocolClientSocketHandle< SocketProtocol >:: | ||||
ProtocolClientSocketHandle | () | |||
Create new client socket.
This constructor is one of the possible constructors. The exact Signature of the constructor (or constructors) is defined by the init_client()
member (or members) of the Protocol class. ProtocolClientSocketHandle defines a number of constructors taking up to 9 arguments which just forward to a corresponding Protocolinit_client()
member. See the documentation of the respective Protocol class for a detailed documentation of that protocols constructors.
Definition at line 44 of file ProtocolClientSocketHandle.cti.
senf::ProtocolClientSocketHandle< SocketProtocol >:: | ||||
ProtocolClientSocketHandle | ( | senf::NoInit_t | ) | |
Create uninitialized socket variable.
This special constructor is called when passing senf::noinit
as only argument to the constructor. This will create an in-valid() socket handle which can however be assigned later with another socket instance.
body
allocated.Definition at line 40 of file ProtocolClientSocketHandle.cti.
senf::ProtocolClientSocketHandle< SocketProtocol >:: | ||||
ProtocolClientSocketHandle | ( | FileHandle | other, | |
bool | isChecked | ) | ||
Definition at line 57 of file ProtocolClientSocketHandle.cti.
senf::ProtocolClientSocketHandle< SocketProtocol > senf::ProtocolClientSocketHandle< SocketProtocol >:: | ||||
cast_dynamic | ( | FileHandle | handle | ) |
For internal use only.
Reimplemented from senf::ClientSocketHandle< SocketProtocol::Policy >.
Definition at line 81 of file ProtocolClientSocketHandle.cti.
senf::ProtocolClientSocketHandle< SocketProtocol > senf::ProtocolClientSocketHandle< SocketProtocol >:: | ||||
cast_static | ( | FileHandle | handle | ) |
For internal use only.
Reimplemented from senf::ClientSocketHandle< SocketProtocol::Policy >.
Definition at line 74 of file ProtocolClientSocketHandle.cti.
std::string senf::ProtocolClientSocketHandle< SocketProtocol >:: | ||||
dumpState | ( | unsigned |
lod = 0
|
) |
Format complete state information as string.
Formats the complete state map value and returns it as a single multi-line string.
lod | level of detail requested. The interpretation of this value is protocol specific |
Reimplemented from senf::ClientSocketHandle< SocketProtocol::Policy >.
Definition at line 105 of file ProtocolClientSocketHandle.cti.
SocketProtocol & senf::ProtocolClientSocketHandle< SocketProtocol >:: | ||||
protocol | () | |||
Access the protocol interface.
The returned protocol class reference gives access to the complete protocol interface as defined by that class. See the respective protocol class documentation.
Definition at line 63 of file ProtocolClientSocketHandle.cti.
void senf::ProtocolClientSocketHandle< SocketProtocol >:: | ||||
state | ( | SocketStateMap & | map, | |
unsigned |
lod = 0
|
) | ||
Inquire state information of socket handle.
The map argument (a string to string mapping) will be filled with information covering the current state of the socket. The information provided depends on the socket protocol. The amount of information returned can be controlled using the lod
value.
See senf::SocketProtocol::state() for more information, how the Information is generated.
map | string to string mapping to be filled with state information | |
lod | level of detail requested. The interpretation of this value is protocol specific |
Reimplemented from senf::ClientSocketHandle< SocketProtocol::Policy >.
Definition at line 92 of file ProtocolClientSocketHandle.cti.