Module irccd.socket.address
Address for Sockets.
This API provides addresses for binding, connecting to sockets.
Functions
unix (path, remove) | Create a Unix family address. |
bindInet (params) | Bind to a IP address. |
connectInet (params) | Create an address for connecting. |
Functions
- unix (path, remove)
-
Create a Unix family address.
This function is not available on Windows.
Parameters:
- path the path
- remove set to true to remove the file, default: false
Returns:
- a new SocketAddress or nil
- the error message
- bindInet (params)
-
Bind to a IP address.
The parameters are:
- port: required, the port
- family: required, the family
- address: optional, "*" for any or the address. Default: "*"
Parameters:
- params the table of parameters
Returns:
- a new SocketAddress or nil
- the error message
- connectInet (params)
-
Create an address for connecting.
The parameters are:
- port: required, the port
- family: required, the family
- host: required, the hostname
Parameters:
- params the table of parameters
Returns:
- a new SocketAddress or nil
- the error message