Download IRC5-Rapid Reference..

Transcript
6RFNHW/LVWHQ
,QVWUXFWLRQ
6RFNHW0HVVDJLQJ
6RFNHW/LVWHQ/LVWHQIRULQFRPLQJFRQQHFWLRQV
6RFNHW/LVWHQ is used to start listen for incoming connections, i.e. start act as a server.
6RFNHW/LVWHQcan only used for a server applications.
([DPSOHV
VAR socketdev server_socket;
...
SocketCreate server_socket;
SocketBind server_socket, “192.168.0.1”, 1025;
SocketListen server_socket;
A server socket is created and bound to port on the controller network
address . After execution of 6RFNHW/LVWHQ the server socket start to
listen for incoming connections on this port and address.
$UJXPHQWV
6RFNHW/LVWHQ 6RFNHW
6RFNHW
'DWDW\SHVRFNHWGHY
The server socket that should start listen for incoming connections. The socket
must already be created and bounded.
3URJUDPH[HFXWLRQ
The server socket start listen for incoming connections. When the instruction is ready,
the socket is ready to accept an incoming connection.
6\QWD[
SocketListen
[ Socket ’:=’ ] < variable (9$5) of VRFNHWGHY > ’;’
5$3,'UHIHUHQFHPDQXDOSDUW,QVWUXFWLRQV6=
63