Client thread test version. Ready to connect.

This commit is contained in:
lotodore
2007-02-17 23:44:45 +00:00
parent 6eb192f846
commit 592863ecf5
11 changed files with 478 additions and 23 deletions
+9
View File
@@ -29,11 +29,15 @@
#ifdef _WIN32
#define CLOSESOCKET closesocket
#define IOCTLSOCKET ioctlsocket
#define SOCKET_ERRNO() WSAGetLastError()
#else
#define SOCKET int
#define SOCKET_ERROR -1
#define INVALID_SOCKET -1
#define CLOSESOCKET close
#define SOCKET_ERRNO() errno
#define IOCTLSOCKET ioctl
#endif
#define IS_VALID_SOCKET(_s) ((_s) != INVALID_SOCKET)
@@ -56,6 +60,11 @@ bool socket_string_to_addr(const char *str, int addrFamily, struct sockaddr *add
*/
bool socket_resolve(const char *str, const char *port, int addrFamily, int sockType, int protocol, struct sockaddr *addr, int addrLen);
/**
* Set the port in the sockaddr structure.
*/
bool socket_set_port(unsigned port, int addrFamily, struct sockaddr *addr, int addrLen);
/**
* Internal function (common for all OSs).
*/