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
+11 -9
View File
@@ -20,15 +20,17 @@
#ifndef _SOCKET_MSG_H_
#define _SOCKET_MSG_H_
#define ERR_SOCK_SERVERADDR_NOT_SET 1
#define ERR_SOCK_INVALID_PORT 2
#define ERR_SOCK_CREATION_FAILED 3
#define ERR_SOCK_SET_PORT_FAILED 4
#define ERR_SOCK_RESOLVE_FAILED 5
#define ERR_SOCK_CONNECT_FAILED 6
#define ERR_SOCK_SELECT_FAILED 7
#define ERR_SOCK_RECV_FAILED 8
#define ERR_SOCK_SEND_FAILED 9
#define ERR_SOCK_INTERNAL 1
#define ERR_SOCK_SERVERADDR_NOT_SET 2
#define ERR_SOCK_INVALID_PORT 3
#define ERR_SOCK_CREATION_FAILED 4
#define ERR_SOCK_SET_PORT_FAILED 5
#define ERR_SOCK_RESOLVE_FAILED 6
#define ERR_SOCK_CONNECT_FAILED 7
#define ERR_SOCK_SELECT_FAILED 8
#define ERR_SOCK_RECV_FAILED 9
#define ERR_SOCK_SEND_FAILED 10
#define ERR_SOCK_CONN_RESET 11
// This is an internal message which is not reported.
#define MSG_SOCK_INTERNAL_PENDING 0