64 TCPPort (std::map<std::string, std::string> options);
76 ssize_t Read (
void *
const buffer,
size_t count);
78 ssize_t ReadFull (
void *
const buffer,
size_t count);
80 ssize_t BytesAvailable ();
82 ssize_t BytesAvailableWait ();
84 ssize_t Write (
const void *
const buffer,
size_t count);
90 std::string GetStatus ()
const;
92 void SetTimeout (
Timeout timeout);
94 void SetCanRead (
bool canRead);
96 void SetCanWrite (
bool canWrite);
98 bool IsOpen ()
const {
return _open; }
109 void CheckPort (
bool read);
111 bool ProcessOption (
const std::string &option,
const std::string &value);
114 void WaitForConnection ();
115 typedef enum {TIMED_OUT, DATA_AVAILABLE, CAN_WRITE} WaitStatus;
116 WaitStatus WaitForDataOrTimeout ();
117 bool IsDataAvailable ();
118 WaitStatus WaitForWritableOrTimeout ();
119 void SetSocketBlockingFlag ();
126 #endif // __TCPPORT_H TCP implementation of the Port class.
bool IsOpen() const
Check if the port is open.
An object used to represent timeouts.