public class SocketInputStream implements InputStream
Binary input stream wrapper for Socket.
import klyn.net
socket = Socket("example.com", 80)
try stream = socket.getInputStream():
print(stream.readBytes(8).size)| Modifier and Type | Member | Description |
|---|---|---|
| public | closeclose() as Void throws IOException |
Performs a network operation. |
| public | readread() as String throws IOException |
Reads a text chunk from the socket. |
| public | readBytesreadBytes(length as Long) as Array<Byte> throws IOException |
Reads bytes from the socket. |