Closes the socket and the streams. It is safe to call this method multiple times.
Connect (HostAsString, PortAsInt, TimeoutAsInt)
Tries to to connect to the given address. The Connected event will be raised when operation completes. Host - The host name or ip address. Port - Port number. Timeout - Connection timeout measured in milliseconds. Pass 0 to disable the timeout.
ConnectedAsBoolean [read only]
Returns true if the socket is connected.
InputStreamAsInputStream [read only]
Gets the network input stream. In most cases the stream should be passed to an AsyncStreams object.
OutputStreamAsOutputStream [read only]
Gets the network output stream. In most cases the stream should be passed to an AsyncStreams object.
Gets or sets the socket timeout, measured in milliseconds. By default there is no timeout.
Initializes the socket and starts listening for packets. EventName - Sets the sub that will handle the PacketArrived event. Port - Local port to listen on. Pass 0 to let the OS choose an available port. ReceiveBufferSize - The maximum size of received packets. Pass 0 if the socket should not listen to incoming packets.