Public Member Functions | |
| void | init (char *server_hostname) |
| int | read () |
| unsigned long | time () |
| WindowsSocketImpl () | |
| void | write (const unsigned char *data, int length) |
Protected Member Functions | |
| void | connect_to_server (struct addrinfo *servers) |
| struct addrinfo * | get_server_addr (const string &hostname) |
Private Attributes | |
| SOCKET | mySocket |
Definition at line 41 of file WindowsSocket.cpp.
| WindowsSocketImpl::WindowsSocketImpl | ( | ) | [inline] |
Definition at line 46 of file WindowsSocket.cpp.
| void WindowsSocketImpl::connect_to_server | ( | struct addrinfo * | servers | ) | [inline, protected] |
Helper to connect the socket to a given address.
| server | address of the server to connect to, linked list |
Definition at line 159 of file WindowsSocket.cpp.
| struct addrinfo* WindowsSocketImpl::get_server_addr | ( | const string & | hostname | ) | [inline, read, protected] |
Helper to get the addrinfo for the server based on a string hostname. NB: you can just pass in a const char* and C++ will automatically create the string instance for you.
| hostname | the hostname to connect to. Understands "host:port" |
Definition at line 129 of file WindowsSocket.cpp.
| void WindowsSocketImpl::init | ( | char * | server_hostname | ) | [inline] |
Definition at line 49 of file WindowsSocket.cpp.
| int WindowsSocketImpl::read | ( | ) | [inline] |
Definition at line 79 of file WindowsSocket.cpp.
| unsigned long WindowsSocketImpl::time | ( | ) | [inline] |
Definition at line 110 of file WindowsSocket.cpp.
| void WindowsSocketImpl::write | ( | const unsigned char * | data, |
| int | length | ||
| ) | [inline] |
Definition at line 99 of file WindowsSocket.cpp.
SOCKET WindowsSocketImpl::mySocket [private] |
Definition at line 198 of file WindowsSocket.cpp.