23 #ifndef __ccxx_StreamSocket_hxx 24 #define __ccxx_StreamSocket_hxx 55 void connect(
const String& addr, uint16_t port);
58 size_t read(
byte_t* buffer,
size_t buflen);
59 size_t write(
const byte_t* buffer,
size_t buflen);
73 inline size_t read(
byte_t* buffer,
size_t buflen, int64_t offset,
77 inline size_t write(
const byte_t* buffer,
size_t buflen, int64_t offset,
104 void writeOOB(
byte_t data);
107 virtual void shutdown();
120 #endif // __ccxx_StreamSocket_hxx size_t write(ByteBuffer &buffer)
Write data to the stream from a ByteBuffer.
Definition: StreamSocket.h++:64
IOMode
Stream I/O modes.
Definition: Stream.h++:36
An encapsulation of a block of memory.
Definition: MemoryBlock.h++:37
size_t read(byte_t *buffer, size_t buflen, int64_t offset, AsyncIOTask &task)
Definition: StreamSocket.h++:73
An unbuffered I/O stream.
Definition: Stream.h++:60
size_t read(ByteBuffer &buffer, int64_t offset, AsyncIOTask &task)
Definition: StreamSocket.h++:81
A server (listening) socket for StreamSocket (TCP) connections.
Definition: ServerSocket.h++:40
A reliable, connection-oriented stream (TCP) socket.
Definition: StreamSocket.h++:38
A base class for network sockets.
Definition: Socket.h++:61
unsigned int uint_t
An alias for unsigned int.
Definition: Integers.h++:74
size_t write(const byte_t *buffer, size_t buflen, int64_t offset, AsyncIOTask &task)
Write data asynchronously to the stream from a raw buffer.
Definition: Stream.c++:727
size_t write(ByteBuffer &buffer, int64_t offset, AsyncIOTask &task)
Definition: StreamSocket.h++:84
Read/write mode.
Definition: Stream.h++:42
int SocketHandle
Definition: Socket.h++:52
A socket endpoint network address.
Definition: SocketAddress.h++:46
size_t write(CharBuffer &buffer)
Write data to the stream from a CharBuffer.
Definition: StreamSocket.h++:70
virtual size_t read(ByteBuffer &buffer)
Read data from the stream into a ByteBuffer.
Definition: Stream.c++:93
#define COMMONCPP_API
Definition: Common.h++:126
A buffer for storing a contiguous sequence of elements.
Definition: Buffer.h++:44
A flexible, reference counted, copy-on-write, thread-safe, nullable string.
Definition: String.h++:50
size_t read(ByteBuffer &buffer)
Read data from the stream into a ByteBuffer.
Definition: StreamSocket.h++:61
#define CCXX_COPY_DECLS(CLASS)
Inlines declarations of a copy constructor and assignment operator for the class CLASS.
Definition: Common.h++:295
int timespan_ms_t
A timespan expressed in milliseconds.
Definition: Integers.h++:104
size_t write(const byte_t *buffer, size_t buflen, int64_t offset, AsyncIOTask &task)
Definition: StreamSocket.h++:77
Definition: AllocationMap.c++:25
size_t read(CharBuffer &buffer)
Read data from the stream into a CharBuffer.
Definition: StreamSocket.h++:67
An object representing an asynchronous I/O operation.
Definition: AsyncIOTask.h++:43
unsigned char byte_t
An unsigned 8-bit value.
Definition: Integers.h++:68