sprint 1-alpha
|
Socket helper function. More...
#include <sprint/sysdef.h>
Go to the source code of this file.
Namespaces | |
namespace | sprint |
Sprint is a lightweight c++ library to handle different task with crossplatform attention (trying to compile both on MSVC and Mingw on WIn32 and GCC on Linux. | |
Functions | |
bool | sprint::socket_bind (SOCKET s, WORD wPort) |
bind socket to all local interface with port wPort | |
bool | sprint::socket_connect (SOCKET s, LPCSTR server_name, WORD port) |
connect socket s with server_name:port | |
bool | sprint::socket_accept (SOCKET s, SOCKET *target, sockaddr_in &addr) |
accept an incoming connection | |
int | sprint::aff_write (SOCKET s, const char *mem, unsigned int len) |
int | sprint::aff_read (SOCKET desc, char *buffer, unsigned int len) |
LPCSTR | sprint::IdentifyError (UINT error) |
int | sprint::print_sockerr () |
BOOL | sprint::CreateSocketAddress (sockaddr_in *target, LPCSTR server_name, UINT port) |
BOOL | sprint::CreateSocketByHostName (sockaddr_in *target, LPCSTR host_name) |
SOCKET | sprint::CreateBindSocket (WORD wPort, int type) |
SOCKET | sprint::ConnectToLocalHost (UINT port) |
SOCKET | sprint::ConnectToServer (sockaddr_in *target, int type) |
SOCKET | sprint::AcceptConnection (UINT port) |
SOCKET | sprint::ConnectToServerByName (LPCSTR server_name, WORD port, int type) |
BOOL | sprint::mcast_add_membership (SOCKET sd, LPCSTR mcastgroup, struct ip_mreq *pmreq) |
BOOL | sprint::mcast_drop_membership (SOCKET sd, struct ip_mreq *pmreq) |
Socket helper function.