peerConnection.h

Go to the documentation of this file.
00001 #ifndef PEER_CONNECTION_H
00002 #define PEER_CONNECTION_H
00003 
00013 #include "tcpipDevice.h"
00014 
00018 class PeerConnection : public ConnectionDevice {
00019   TcpipDevice* con;
00020   std::string error_message;
00021   PeerConnection(const PeerConnection& rhs);
00022 
00023   int raw_connect(const char* device, long baudrate);
00024   void raw_disconnect(void);
00025   int raw_send(const char* data, int len);
00026   int raw_recv(char* data, int maxlen);
00027   int raw_setBaudrate(long baudrate) { return 0; }
00028   void raw_flush(void) {}
00029   void raw_check(int size, long timeout);
00030 
00031 public:
00032   PeerConnection(void);
00033   ~PeerConnection(void);
00034 
00035   const char* what(void);
00036 
00044   int connect(const char* host, long port, long timeout);
00045   bool isConnected(void);
00046   int recv(char* data, int maxlen, long timeout);
00047 };
00048 
00049 #endif /* !PEER_CONNECTION_H */
00050 

Generated on Mon Apr 13 22:52:05 2009 by  doxygen 1.5.7.1