Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

renoise.Socket.SocketBase SocketBase

SocketBase is the base class for socket clients and servers. All SocketBase properties and functions are available for servers and clients.


Properties

is_open : boolean

Returns true when the socket object is valid and connected. Sockets can manually be closed (see socket:close()). Client sockets can also actively be closed/refused by the server. In this case the client:receive() calls will fail and return an error. READ-ONLY

local_address : string

The socket’s resolved local address (for example “127.0.0.1” when a socket is bound to “localhost”) READ-ONLY

local_port : integer

The socket’s local port number, as specified when instantiated. READ-ONLY


Functions

close(self)

Closes the socket connection and releases all resources. This will make the socket useless, so any properties, calls to the socket will result in errors. Can be useful to explicitly release a connection without waiting for the dead object to be garbage collected, or if you want to actively refuse a connection.