std.socketstreamSocketStream is a stream for a blocking, connected Socket.
For Win32 systems, link with ws2_32.lib.
Christopher E. Miller
- class SocketStream: std.stream.Stream;
- SocketStream is a stream for a blocking,
- this(Socket sock, FileMode mode);
- Constructs a SocketStream with the specified Socket and FileMode flags.
- this(Socket sock);
- Uses mode FileMode.In | FileMode.Out.
- Socket socket();
- Property to get the Socket that is being streamed.
- size_t readBlock(void* _buffer, size_t size);
- Attempts to read the entire block, waiting if necessary.
- size_t writeBlock(void* _buffer, size_t size);
- Attempts to write the entire block, waiting if necessary.
- ulong seek(long offset, SeekPos whence);
- char toString();
- Does not return the entire stream because that would
require the remote connection to be closed.
- void close();
- Close the Socket.