Questions of 7 jul 02 (connectionID)
Dar Scott
dsc at swcp.com
Tue Jul 9 10:30:00 EDT 2002
On Tuesday, July 9, 2002, at 02:17 AM, peter.fink at tiscali.ch wrote:
> Scott thanks. The RR docs say that the parameter to the callback msg of
> accept is the IP address, but you specify that it is the connection ID.
> This clarifies it.
Call me Dar. There is only one true Scott. ;-)
I may not have been clear.
The parameter is the socketID for TCP. It has this format:
ipAddress:port|connectionID
You can parse that for the IP address. You will find it in
openSockets(). You will need to eventually close the socket using
the entire socketID. (I never tried closing with the connectionID
portion and I would guess that it would not work.)
The first parameter may also be called socketID for UDP
(datagram). Assume it has this format:
ipAddress[:port][|other]
In Revolution 1.1.1, this does not correspond to a socket.
The term connectionID is used two ways in Revolution. The term in
sockets (tcp/ip) is not the same as the one in the db capability.
The tcp/ip term comes up again in "open socket". Here, if there is
a chance you will open two or more connections to the same remote
port (and same IP address), you need to specify a unique
connectionID as part of the socketID you create. (Well, unique
relative to that port, probably.) The socketID you create contains
key information for making the connection and works as a unique
reference to the socket. The socketID is used in other functions
to refer to a specific socket. In some parts of the doc,
connectionID is called simply ID.
As far as I know, the connectionID in sockets has no other purpose
than to make the socketID unique.
Other environments use other methods to uniquely refer to sockets.
> but you specify that
Of course, I don't specify anything; I'm always learning about
Revolution, too.
Dar Scott
More information about the use-livecode
mailing list