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