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

Class socket

headers/socket.hpp:71–93  ·  view source on GitHub ↗

* @addtogroup libsocketplusplus * @{ */ * @brief socket is the base class of every other libsocket++ object. * * It provides the most important field: The sfd field holds the file descriptor * for every socket. */

Source from the content-addressed store, hash-verified

69 * for every socket.
70 */
71class socket {
72 protected:
73 /// sfd is the sockets API file descriptor
74 int sfd;
75 bool is_nonblocking;
76 /// Default is true; if set to false, the file descriptor is not closed when
77 /// the destructor is called.
78 bool close_on_destructor;
79
80 public:
81 socket(void);
82 socket(const socket&) = delete;
83 socket(socket&&);
84
85 virtual ~socket();
86
87 virtual int destroy(void);
88
89 int getfd(void) const;
90
91 int set_sock_opt(int level, int optname, const char* optval,
92 socklen_t optlen) const;
93};
94/**
95 * @}
96 */

Callers 6

create_unix_dgram_socketFunction · 0.85
create_inet_dgram_socketFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected