www.digitalmars.com Home | Search | D | Comments
Last update Wed May 24 22:58:27 2006
D
Language
Phobos
Comparisons


object

std
 std.base64
 std.boxer
 std.compiler
 std.conv
 std.cover
 std.ctype
 std.date
 std.demangle
 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.regexp
 std.socket
 std.socketstream
 std.stdint
 std.stdio
 std.cstream
 std.stream
 std.string
 std.system
 std.thread
 std.uni
 std.uri
 std.utf
 std.zip
 std.zlib
 std.c.fenv
 std.c.math
 std.c.process
 std.c.stdarg
 std.c.stddef
 std.c.stdio
 std.c.stdlib
 std.c.string
 std.c.time
 std.c.wcharh
 std.windows.charset

std.windows

std.linux

std.c.windows

std.c.linux

std.socketstream

SocketStream is a stream for a blocking, connected Socket.

For Win32 systems, link with ws2_32.lib.

Example:
See /dmd/samples/d/htmlget.d

Authors:
Christopher E. Miller

References:
std.stream

class SocketStream: std.stream.Stream;
SocketStream is a stream for a blocking, connected Socket.

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.

uint readBlock(void* _buffer, uint size);
Attempts to read the entire block, waiting if necessary.

uint writeBlock(void* _buffer, uint 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.