libsocket
Namespaces | Functions
dgramclient.cpp File Reference

Base class for all datagram-based socket classes. More...

Go to the source code of this file.

Namespaces

 libsocket
 Contains libsocket elements.
 

Functions

dgram_client_socket & libsocket::operator>> (dgram_client_socket &sock, string &dest)
 Receive data from connected datagram socket. More...
 
dgram_client_socket & libsocket::operator<< (dgram_client_socket &sock, const char *str)
 Send data to connected peer. More...
 
dgram_client_socket & libsocket::operator<< (dgram_client_socket &sock, const string &str)
 Send data to connected peer. More...
 

Detailed Description

Base class for all datagram-based socket classes.

    dgramclient.cpp contains the class dgram_client_socket. This
    class provides the read/write functions for connected datagram
    sockets (alias client dgram sockets...). This helps to avoid
    writing the same code more than one time.
    The client datagram classes for specific domains which are
    unix_dgram_client and inet_dgram_client inherit the functions
    declared here to get the ability to send and receive
    data via connected datagram sockets. It is not possible to use
    a class which has this functions also for stream sockets because
    the functions have to check if the socket is connected (bool connected).
    In the stream classes, this check is realized by checking if the file
    descriptor is -1 or not.

Definition in file dgramclient.cpp.