|
sprint 1-alpha
|
wrapper for Berkeley Socket More...
#include <socket.h>
Inherits if_copiable<!bManaged >.
Inherited by sprint::detail::tcp_socket< bManaged >, and sprint::detail::udp_socket< bManaged >.
Public Member Functions | |
| socket (SOCKET _s=INVALID_SOCKET) | |
| ctor | |
| ~socket () | |
| dtor: RILASCIA IL SOCKET | |
| SOCKET | handle () const |
| return the inner SOCKET | |
| void | shutdown () const |
| shutdown function disables sends and/or receives on a socket. | |
| void | close () |
| close | |
| bool | is_valid () const |
| test if socket is a valid handle | |
| bool | getsockname (sockaddr_in *target) const |
| getSockName function gets the local address for a socket. | |
| bool | getpeername (sockaddr_in *target) const |
| getPeerName function gets the address of the peer to which a socket is connected. | |
| int | listen (int backlog) const |
| listen function establishes a socket to listen for an incoming connection. | |
| bool | set_ttl (int ttl) |
| set TimeToLive | |
| bool | connect (LPCSTR server_name, WORD port) |
| Connect to a specificed server,port. | |
| bool | bind (WORD wPort) |
| bind current socket to a specified port | |
| int | ioctl (long cmd, u_long *argp) const |
| ioctl function controls the mode of a socket. | |
| int | write (const char *buf, unsigned int len) const |
| send packet in reliable mode | |
| template<class T > | |
| int | write (const T &item) const |
| Write an object of type T of size sizeof(T) | |
| int | send (const char *buf, unsigned int len) const |
| send a packet in unreliable mode | |
| template<class T > | |
| int | send (const T &item) const |
| Send an object of type T of size sizeof(T) | |
| int | read (char *buf, unsigned int len) const |
| read from stream (in unreliable mode) | |
| int | AsynchSelect (HWND hwnd, unsigned int wMsg, long lEvent) |
| AsynchSelect function requests Windows message-based notification of network events for a socket. | |
| int | EventSelect (WSAEVENT hEventObject, long lNetworkEvents) |
| WSAEventSelect function specifies an event object to be associated with the supplied set of FD_XXX network events. | |
| SOCKET | accept (sockaddr_in *paddr) |
| bool | accept (socket< true > &target, sockaddr_in &addr) |
| accept connection | |
| SOCKET | accept (void) |
| accept connection | |
Protected Attributes | |
| SOCKET | s |
wrapper for Berkeley Socket
| SOCKET sprint::detail::socket< bManaged >::accept | ( | sockaddr_in * | paddr | ) |
accept connection
1.7.4