problem with socketID
Dave Cragg
dcragg at lacscentre.co.uk
Fri Nov 15 13:39:01 EST 2002
At 4:54 pm -0500 15/11/02, Zac Elston wrote:
>I can open and read/write to a socket with
>
>on mouseup
> open socket to "host:25"
> read from socket "host:25"until linefeed
> answer it
> close socket "host:25"
>end mouseup
>
>but when I try to use a socketID, it does not work.
>
>on mouseup
> open socket to "host:25|mysocketname"
> read from socket mysocketname until linefeed
> answer it
> close socket mysocketname
>end mouseup
When referring to a socket, you need to include the host, port and,
if used, the connection ID (socket ID).
so...
put "somehost:8000|1000" into tSocket
open socket tSocket
write "hello" to socket tSocket
close socket tSocket
The purpose of the connection ID is to allow multiple connections to
the same host:port combination.
Cheers
Dave
More information about the use-livecode
mailing list