Public Member Functions | Protected Member Functions | Private Attributes
WindowsSocketImpl Class Reference

List of all members.

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

Detailed Description

Definition at line 41 of file WindowsSocket.cpp.

Constructor & Destructor Documentation

Definition at line 46 of file WindowsSocket.cpp.

Member Function Documentation

void WindowsSocketImpl::connect_to_server ( struct addrinfo *  servers) [inline, protected]

Helper to connect the socket to a given address.

serveraddress 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.

hostnamethe hostname to connect to. Understands "host:port"
pointer to addrinfo from getaddrinfo or NULL on error

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.

Member Data Documentation

SOCKET WindowsSocketImpl::mySocket [private]

Definition at line 198 of file WindowsSocket.cpp.

The documentation for this class was generated from the following file:

Author(s): Kareem Shehata
autogenerated on Thu Jun 6 2019 19:56:37