-const SockAddr &Socket::get_peer_address() const
-{
- if(peer_addr==0)
- throw InvalidState("Peer address not set");
- return *peer_addr;
-}
-
-void Socket::check_state(bool conn) const
-{
- if(handle==MSP_NET_INVALID_SOCKET_HANDLE)
- throw Exception("Socket is closed");
- if(conn && !connected)
- throw Exception("Socket is not connected");
-}
-
-int Socket::get_option(int level, int optname, void *optval, socklen_t *optlen)
+int Socket::set_option(int level, int optname, const void *optval, socklen_t optlen)