00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef TCPConnection_h_DEFINED
00013 #define TCPConnection_h_DEFINED
00014
00015 #include <ant.h>
00016
00017 enum ConnectionState {
00018 CONNECTION_CLOSED,
00019 CONNECTION_CONNECTING,
00020 CONNECTION_CONNECTED,
00021 CONNECTION_LISTENING,
00022 CONNECTION_SENDING,
00023 CONNECTION_RECEIVING,
00024 CONNECTION_CLOSING
00025 };
00026
00027 struct TCPConnection {
00028 antModuleRef endpoint;
00029 ConnectionState state;
00030
00031
00032 antSharedBuffer sendBuffer;
00033 byte* sendData;
00034 int sendSize;
00035
00036
00037 antSharedBuffer recvBuffer;
00038 byte* recvData;
00039 int recvSize;
00040 };
00041
00042 #endif // TCPConnection_h_DEFINED