home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2003 March / VPR0303A.ISO / AIBO / AiboBiff2 / MailChecker / TCPConnection.h < prev   
C/C++ Source or Header  |  2002-12-19  |  994b  |  43 lines

  1. //
  2. // Copyright 2002 Sony Corporation 
  3. //
  4. // Permission to use, copy, modify, and redistribute this software for
  5. // non-commercial use is hereby granted.
  6. //
  7. // This software is provided "as is" without warranty of any kind,
  8. // either expressed or implied, including but not limited to the
  9. // implied warranties of fitness for a particular purpose.
  10. //
  11.  
  12. #ifndef TCPConnection_h_DEFINED
  13. #define TCPConnection_h_DEFINED
  14.  
  15. #include <ant.h>
  16.  
  17. enum ConnectionState {
  18.     CONNECTION_CLOSED,
  19.     CONNECTION_CONNECTING,
  20.     CONNECTION_CONNECTED,
  21.     CONNECTION_LISTENING,
  22.     CONNECTION_SENDING,
  23.     CONNECTION_RECEIVING,
  24.     CONNECTION_CLOSING
  25. };
  26.  
  27. struct TCPConnection {
  28.     antModuleRef     endpoint;
  29.     ConnectionState  state;
  30.  
  31.     // send buffer
  32.     antSharedBuffer  sendBuffer;
  33.     byte*            sendData;
  34.     int              sendSize;
  35.     
  36.     // receive buffer
  37.     antSharedBuffer  recvBuffer;
  38.     byte*            recvData;
  39.     int              recvSize;
  40. };
  41.  
  42. #endif // TCPConnection_h_DEFINED
  43.