UDPEchoServer/UDPEchoServer/UDPConnection.h

Go to the documentation of this file.
00001 //
00002 // Copyright 2002,2003 Sony Corporation 
00003 //
00004 // Permission to use, copy, modify, and redistribute this software for
00005 // non-commercial use is hereby granted.
00006 //
00007 // This software is provided "as is" without warranty of any kind,
00008 // either expressed or implied, including but not limited to the
00009 // implied warranties of fitness for a particular purpose.
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     // send buffer
00032     antSharedBuffer  sendBuffer;
00033     byte*            sendData;
00034     int              sendSize;
00035     IPAddress        sendAddress;
00036     Port             sendPort;
00037     // receive buffer
00038     antSharedBuffer  recvBuffer;
00039     byte*            recvData;
00040     int              recvSize;
00041 };
00042 
00043 #endif // UDPConnection_h_DEFINED

Generated on Sun Dec 2 23:04:31 2007 for openSDK by  doxygen 1.3.9.1