[REBOL] Re: help from Dixon or others about port
From: lmecir:mbox:vol:cz at: 7-Sep-2001 10:03
> I've found in rem42.r this line of code:
> l: open tcp://: out: open join tcp://localhost: l/port-id wait l in:
> I do not understand the last command:
> in: first l
> and why does it make a wait before?
> The command "first port" doesn't give the data in input?
> Why here does it give a pointer to port?
> Ciao (my english is bad)
1) The L port opened with (open tcp://:) is a listen (or server) port. Its
function is to provide ports to clients that are trying to connect. To be
able to speak to the specific client you must get a port to that client from
the listen port.
2) The Out port is a client port trying to connect to the server.
3) The In port is a port that the server- (or listen-) port provides as a
reaction to the client attempt to connect. Wait is there, because the server
must establish the connection to the client before it can provide a port.