generate_port, try_bind_listen, try_connect, try_accept, register_servergenerate_port(), integer for the others
generate_port() generates a port name for communication.
If the argument is not specified or equal to 0, a port number
for Internet domain socket is generated randomly. Otherwise
a file name for UNIX domain (host-internal protocol) is generated.
Note that it is not assured that the generated port is not in use.
try_bind_listen() creates a socket according to the protocol
family indicated by the given port and executes bind and listen.
It returns a socket identifier if it is successful. -1 indicates an error.
try_connect() tries to connect to a port port on
a host host.
It returns a socket identifier if it is successful. -1 indicates an error.
try_accept() accepts a connection request to a socket socket.
It returns a new socket identifier if it is successful. -1 indicates an error.
In any case socket is automatically closed.
port is specified to distinguish the protocol family of socket.
register_server() registers a pair of a control socket and a server
socket. A process identifier indicating the pair is returned.
The process identifier is used as an argument
of ox functions such as ox_push_cmo().
shell(), or manually.
[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
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.