simple-socket library 1.5.0
Loading...
Searching...
No Matches
UnixStreamSocket.h
1#ifndef NET_UnixStreamSocket_h__
2#define NET_UnixStreamSocket_h__
3
4#include "SocketHandle.h"
5#include "UnixSocket.h"
6
7namespace NET
8{
11 {
12 public:
15
21
29 explicit UnixStreamSocket( Handle&& handle);
30
33
40 Handle accept() const;
41
48 Handle timedAccept( int timeout) const;
49
52
55 };
56
57} // namespace NET
58
59#endif // NET_UnixStreamSocket_h__
int receiveAll(void *buffer, size_t len)
receive exactly the requested amount unless the peer disconnects
void listen(int backlog=5)
listen for incoming connections
int sendAll(const void *buffer, size_t len)
send data through a connected socket
A simple class to provide strict ownership of socket handles.
UnixSocket(int type, int protocol)
allows a subclass to create new socket
Definition UnixSocket.cpp:9
SocketHandle< UnixStreamSocket > Handle
Handle for a new socket returned by accept().
Handle timedAccept(int timeout) const