MCPcopy Create free account
hub / github.com/dermesser/libsocket / dgram_client_socket

Class dgram_client_socket

headers/dgramclient.hpp:53–80  ·  view source on GitHub ↗

* @brief Represents a generic "client" datagram socket, i.e. a datagram socket * which can be connected. */

Source from the content-addressed store, hash-verified

51 * which can be connected.
52 */
53class dgram_client_socket : public virtual socket {
54 protected:
55 bool connected; ///< Stores the connection state of the socket so other
56 ///< functions in this class can check if the socket is
57 ///< connected. The `connection()` method itself is
58 ///< implemented in derived classes, e.g. inet_dgram_client
59
60 public:
61 dgram_client_socket(void);
62
63 friend dgram_client_socket& operator<<(dgram_client_socket& sock,
64 const char* str);
65 friend dgram_client_socket& operator<<(dgram_client_socket& sock,
66 const string& str);
67
68 ssize_t snd(const void* buf, size_t len, int flags = 0); // flags: send()
69
70 // I
71 friend dgram_client_socket& operator>>(dgram_client_socket& sock,
72 string& dest);
73
74 ssize_t rcv(void* buf, size_t len, int flags = 0);
75
76 // @deprecated
77 bool getconn(void) const;
78
79 bool is_connected(void) const;
80};
81
82/**
83 * @}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected