D
Language
Phobos
Comparisons
object
std
std.base64
std.boxer
std.compiler
std.conv
std.ctype
std.date
std.file
std.format
std.gc
std.intrinsic
std.math
std.md5
std.mmfile
std.openrj
std.outbuffer
std.path
std.process
std.random
std.recls
std.regexp
std.socket
std.socketstream
std.stdint
std.stdio
std.cstream
std.stream
std.string
std.system
std.thread
std.uri
std.utf
std.zip
std.zlib
std.windows
std.linux
std.c
std.c.stdio
std.c.windows
std.c.linux
|
std.socketstream
- class SocketStream : std.stream.Stream
- SocketStream is a stream for a blocking,
connected Socket.
- this(Socket sock, std.stream.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.
- uint readBlock(void* buffer, uint size)
- Attempts to read the entire block, waiting if necessary.
- char[] readLine()
wchar[] readLineW()
- Read a line. Safely does not use ungetc/ungetcw.
- uint writeBlock(void* buffer, uint size)
- Attempts to write the entire block, waiting if necessary.
- bit eof()
- Returns true if a remote disconnection has been detected.
- char[] toString()
- Does not return the entire stream because that would
require the remote connection to be closed.
- void close()
- Close the Socket.
Notes
For Win32 systems, link with ws2_32.lib.
Example
See /dmd/samples/d/htmlget.d.
|