This function encapsulates a Socket and a single Dialer and/or Listener.
The Socket may be accessed by $socket
, and the Dialer or
Listener by $dialer[[1]]
or $listener[[1]]
respectively.
The object's methods may be accessed by $
e.g. $send()
or
$recv()
. These methods mirror their functional equivalents, with
the same arguments and defaults, apart from that the first argument of the
functional equivalent is mapped to the object's encapsulated socket and
does not need to be supplied.
More complex network topologies may be created by binding further
dialers or listeners using the object's $dial()
and $listen()
methods. The new dialer/listener will be attached to the object e.g. if
the object already has a dialer, then at $dialer[[2]]
etc.
Note that $dialer_setopt()
and $listener_setopt()
methods
will be available once dialers/listeners are attached to the object.
These methods apply settings to all dialers or listeners equally. To
apply settings to individual dialers/listeners, access them directly
via $dialer[[2]]
or $listener[[2]]
etc.