Go to the first, previous, next, last section, table of contents.


generate_port, try_bind_listen, try_connect, try_accept, register_server

generate_port([use_unix])
:: Generates a port number.
try_bind_listen(port)
:: Binds and listens on a port.
try_connect(host,port)
:: Connects to a port.
try_accept(socket,port)
:: Accepts a connection request.
register_server(control_socket,control_port,server_socket,server_port)
:: Registers the sockets for which connections are established.
return
integer or string for generate_port(), integer for the others
use_unix
0 or 1
host
string
port,control_port,server_port
integer or string
socket,control_socket,server_socket
integer
[340] CPort=generate_port();
39896
[341] SPort=generate_port();
37222
[342] CSocket=try_bind_listen(CPort);
3
[343] SSocket=try_bind_listen(SPort);
5

/*
ox_launch is invoked here :
%  ox_launch "127.1" 0 39716 37043 ox_asir "shio:0"
*/

[344] CSocket=try_accept(CSocket,CPort);
6
[345] SSocket=try_accept(SSocket,SPort);  
3
[346] register_server(CSocket,CPort,SSocket,SPort);
0
References
section ox_launch, ox_launch_nox, ox_shutdown, section ox_launch_generic, section shell, section ox_push_cmo, ox_push_local


Go to the first, previous, next, last section, table of contents.