SocketWriter
class in package klyn.net

    public class SocketWriter extends AbstractTextWriter:

AbstractTextWriter
└ SocketWriter

Text writer over one socket connection.

    import klyn.net

    socket = Socket("example.com", 80)
    try writer = socket.writer:
    writer.write("GET / HTTP/1.1\r\n\r\n")

Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | SocketWriter `SocketWriter(socket as Socket):` | Creates a text writer bound to a connected socket.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public override | close `close() as Void throws IOException:` | Closes the underlying socket.
public override | write `write(readonly value as String) as Void throws IOException:` | Writes text to the socket.

Inherited Methods
method Inherited Methods from AbstractTextWriter: close, write, writeChar, writeLine, writeLines
method Inherited Methods from TextWriter: write, writeChar, writeLine, writeLines
method Inherited Methods from AutoClosable: close