Basics
Guides
API Reference
Basics
Guides
API Reference
[290:14] (extern: com.lehman.aussom.AussomServerSocket) extends: object
The serverSocket class implements TCP socket functionality.
serverSocket (int Port = 80)
newServerSocket (int Port = 80)
bind (string Host = "localhost")
Binds the socket to the provided address.
Host is an optional string with the host to use.This object.close ()
Closes the socket connection.
This object.setReuseAddress (bool ReuseAddress)
Sets the reuse address flag.
ReuseAddress is a bool with the reuse address flag.This object.setPerformancePreferences (int ConnectionTime, int Latency, int Bandwidth)
Sets the performance preference values. These maximum values are irrelevant and these are just compared to eachother.
ConnectionTime is an int with the connection time value.Latency is an int with the latency value.Bandwidth is an int with the bandwidth value.This object.setReceiveBufferSize (int RxBufferSize)
Sets the receive buffer size.
RxBufferSize is an int with the receive buffer size.This object.setHost (string Host)
Sets the host for this socket. This must be called prior to connect.
Host is a string with the host name to set.This object.setPort (int Port)
Sets the port number. This must be called prior to connect.
Port is an int with the port number to set.This object.setSoTimeout (int Timeout)
Sets the SO_TIMEOUT flag. This must be called prior to connect.
Timeout is an int with the timeout to set.This object.accept ()
Accepts a new incoming connection and returns the socket. This call blocks until a connection is accepted or an IO exception occurs.
A socket object with the new connection.getHost ()
Gets a string with the host name.
A string with the host name.getPort ()
Gets the port number.
An int with the port number.getReuseAddress ()
Gets the reuse address flag.
A bool with the reuse flag.isBound ()
Gets the is bound flag.
A bool with the is bound flag.isClosed ()
Gets the is closed flag.
A bool with the is closed flag.getReceiveBufferSize ()
Gets the receive buffer size.
An int with the receive buffer size.getSoTimeout ()
Gets the SO_TIMEOUT flag. This must be called prior to connect.
A bool with the flag.[32:6] static extends: object
Enum for Socket traffic classes.
[23:14] static extends: object
Module JAR loader class.
[42:14] (extern: com.lehman.aussom.AussomSocket) extends: object
The socket class implements TCP socket functionality.
socket (string Host = "", int Port = 80)
Socket constructor.
Host is an optional string with the socket hostname.Port is an optional int with the port number.This object.newSocket (string Host = "", int Port = 80)
connect (string Host = "")
Creates a new socket connection with the provided host name.
Host is the optional host name to connect to.This object.bind (string Host = "localhost")
Binds the socket to the local address.
Host is an optional string with the host to bind to.This object.close ()
Closes the socket.
This object.setKeepAlive (bool KeepAlive)
Sets the keep alive flag.
KeepAlive is a bool with the flag value.This object.setOOBInline (bool OOBInline)
Sets the SO_OOBINLINE flag (receipt of TCP urgent data).
OOBInline is a boolean with the flag value.This object.setPerformancePreferences (int ConnectionTime, int Latency, int Bandwidth)
Sets the performance preference values. These maximum values are irrelevant and these are just compared to eachother.
ConnectionTime is an int with the connection time value.Latency is an int with the latency value.Bandwidth is an int with the bandwidth value.This object.setReceiveBufferSize (int RxBufferSize)
Sets the SO_RCVBUF size for the socket.
RxBufferSize is an int with the buffer size.This object.setReuseAddress (bool ReuseAddress)
Sets the SO_REUSEADDR socket flag.
ReuseAddress is a boolean with the flag.This object.setSendBufferSize (int TxBufferSize)
Sets the SO_SNDBUF buffer size for this socket.
TxBufferSize is an int with the buffer size.This object.setSoLinger (bool LingerOn, int LingerVal)
Sets the SO_LINGER value with the specified time in seconds.
LingerOn is a boolean with the linger flag.LingerVal is an int with the value.This object.setTcpNoDelay (bool NoDelay)
Sets the TCP_NODELAY (disable/enable Nagle's algorithm) flag.
NoDelay is the flag to set.This object.setTrafficClass (string TrafficClass)
Sets the type-of-service octet in the IP header for packets sent from this socket.
TrafficClass is a string with the traffic class to set. See the trafficClass enum for available values.This object.writeln (string Line)
Writes the provided line to the socket.
Line is a string to write.This object.write (string Str)
Writes the provided string to the socket.
Str is the string to write.This object.writeBytes (object Buff)
Writes the bytes with the provided Buffer object to the socket.
Buff is the Buffer object to write.This object.writeBytesFrom (object Buff, int Index = 0, int Length = -1)
Writes bytes from the provided Buffer with the provided index and length.
Buff is the Buffer object to write.Index is the start index within the Buffer to write.Length is the length in bytes to write with the default of -1 meaning write all from the index.This object.setHost (string Host)
Sets the host string. This must be set prior to connect.
Host is a string with the host to set.This object.setPort (int Port)
Sets the port number. This must be called prior to connect.
Port is an int with the port number to set.This object.setSoTimeout (int Timeout)
Sets the SO_TIMEOUT with the specified timeout in milliseconds. This must be called prior to connect.
Timeout is an int with the timeout in milliseconds to set.This object.readln ()
Reads a string of characters from the stream until a newline character is found.
A string with the characters read.read ()
Reads a single character from the stream.
A string with the returned character.readBytes (int Length)
Reads X number of bytes from the stream into a Buffer that is returned.
Length is an int with the number of bytes to read.A Buffer object with the read bytes.readBytesTo (object Buff, int Index = 0, int Length = -1)
Reads X number of bytes from the stream into the provided Buffer at the given index.
Buff is the Buffer object to read bytes into.Index is an int with the index to start reading into at.Length is an int with the number of bytes to read.This object.getKeepAlive ()
Gets the SO_KEEPALIVE flag value.
A bool with the keep alive flag.getOOBInline ()
Gets the SO_OOBINLINE flag.
A bool with the flag.getReceiveBufferSize ()
Gets the receive buffer size.
An int with the receive buffer size.getReuseAddress ()
Gets the reuse address flag.
A bool with the reuse address flag.getSendBufferSize ()
Gets the send buffer size.
An it with the send buffer size.getSoLinger ()
Gets the SO_LINGER flag.
A bool with the flag.getTcpNoDelay ()
Gets the TCP_NODELAY flag.
A bool with the flag.getTrafficClass ()
Gets the traffic class for the socket.
A string with the traffic class. See the trafficClass enum for available values.getSoTimeout ()
Gets the SO_TIMEOUT value.
An int with the timeout value.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.