Questions of 7 jul 02

Dar Scott dsc at swcp.com
Mon Jul 8 23:54:01 EDT 2002


On Monday, July 8, 2002, at 10:00 PM, Chipp Walters wrote:

>> 1) accept command returns a connectionID. How and where is it 
>> returned?
>
> Peter, It's returned with the message.

There may be a potential for confusion here.  Revolution tcp/ip 
documentation refers to both socketID and connectionID.  When I 
first read connectionID, I thought socketID, too.

The accept command includes a callbackmessage.  This is the name of 
a handler.  A message will be sent to the handler for each 
connection made in the case of tcp and for each datagram received 
for udp.

If the accept is for tcp (the "datagram" keyword is not included), 
the message has only one parameter.  It is a socketID, a string 
used to represent the connection.  It uniquely represents the 
connection created.  It includes the remote IP address and port, 
but that is not always enough to make the connection unique, so a 
connectionID is added.  As far as I know, its only use is to make 
the socketID unique.  Use the socketID to communicate through the 
socket.

If the accept is for udp, the message has two parameters and the 
handler would normally be written for two.  The second is the 
datagram value.  You may ignore the socket id; in Revolution 1.1.1 
it does not represent a real socket.

Dar Scott




More information about the use-livecode mailing list