Added helper class for receiving data. Modified sender thread to support sending partial packets. Prepared abstractions for server state machine.

This commit is contained in:
lotodore
2007-03-13 02:23:12 +00:00
parent 29b29ec42e
commit f5289a6fcf
24 changed files with 508 additions and 70 deletions
+3 -1
View File
@@ -45,13 +45,15 @@ typedef unsigned char u_char;
#define SOCKET_ERRNO() errno
#define IOCTLSOCKET ioctl
#define SOCKET_ERR_WOULDBLOCK EINPROGRESS
#endif
#define IS_VALID_SOCKET(_s) ((_s) != INVALID_SOCKET)
#define IS_VALID_CONNECT(_c) ((_c) == 0)
#define IS_VALID_BIND(_b) ((_b) != SOCKET_ERROR)
#define IS_VALID_RECV(_r) ((_r) != SOCKET_ERROR)
#define IS_VALID_SEND(_s) ((_s) != SOCKET_ERROR)
#define IS_VALID_BIND(_b) ((_b) != SOCKET_ERROR)
#define IS_VALID_SELECT(_s) ((_s) != SOCKET_ERROR)
// All char *s are assumed to be UTF-8.