21 #ifndef G_READ_WRITE__H
22 #define G_READ_WRITE__H
52 typedef size_t size_type ;
53 typedef ssize_t ssize_type ;
55 virtual ssize_type
read(
char * buffer , size_type buffer_length ) = 0 ;
60 virtual ssize_type
write(
const char * buf , size_type len ) = 0 ;
73 virtual SOCKET
fd()
const = 0 ;
An abstract interface for reading and writing from a non-blocking i/o channel.
virtual ssize_type write(const char *buf, size_type len)=0
Sends data.
virtual ~ReadWrite()
Destructor.
virtual bool eWouldBlock()=0
See read() and write().
virtual ssize_type read(char *buffer, size_type buffer_length)=0
Reads data.
virtual SOCKET fd() const =0
Returns the file descriptor.