Add more socket options.
This commit is contained in:
parent
820b087c75
commit
020bfe6728
@ -1,13 +1,6 @@
|
||||
asio to-do items
|
||||
================
|
||||
|
||||
Add more socket options
|
||||
-----------------------
|
||||
Add support for additional socket options beyond the sample few that exist now.
|
||||
May want to consider not exposing the option for non-blocking I/O, and simply
|
||||
state that using the asynchronous operations is the portable way to go about
|
||||
it.
|
||||
|
||||
Add vectored send/recv functions
|
||||
--------------------------------
|
||||
Add the sendv and recvv functions to basic_stream_socket and presumably also to
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
}
|
||||
|
||||
/// Socket option for disabling the Nagle algorithm.
|
||||
typedef socket_option::flag<IPPROTO_TCP, TCP_NODELAY> tcp_no_delay;
|
||||
typedef socket_option::flag<IPPROTO_TCP, TCP_NODELAY> no_delay;
|
||||
};
|
||||
|
||||
} // namespace ipv4
|
||||
|
@ -150,12 +150,33 @@ private:
|
||||
int value_;
|
||||
};
|
||||
|
||||
/// Permit sending of broadcast messages.
|
||||
typedef flag<SOL_SOCKET, SO_BROADCAST> broadcast;
|
||||
|
||||
/// Prevent routing, use local interfaces only.
|
||||
typedef flag<SOL_SOCKET, SO_DONTROUTE> dont_route;
|
||||
|
||||
/// Send keep-alives.
|
||||
typedef flag<SOL_SOCKET, SO_KEEPALIVE> keep_alive;
|
||||
|
||||
/// The receive buffer size for a socket.
|
||||
typedef integer<SOL_SOCKET, SO_SNDBUF> send_buffer_size;
|
||||
|
||||
/// Send low watermark.
|
||||
typedef integer<SOL_SOCKET, SO_SNDLOWAT> send_low_watermark;
|
||||
|
||||
/// Send timeout.
|
||||
typedef integer<SOL_SOCKET, SO_SNDTIMEO> send_timeout;
|
||||
|
||||
/// The send buffer size for a socket.
|
||||
typedef integer<SOL_SOCKET, SO_RCVBUF> recv_buffer_size;
|
||||
|
||||
/// Receive low watermark.
|
||||
typedef integer<SOL_SOCKET, SO_RCVLOWAT> recv_low_watermark;
|
||||
|
||||
/// Receive timeout.
|
||||
typedef integer<SOL_SOCKET, SO_RCVTIMEO> recv_timeout;
|
||||
|
||||
/// Allow the socket to be bound to an address that is already in use.
|
||||
typedef flag<SOL_SOCKET, SO_REUSEADDR> reuse_address;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user