open socket with message for function?

andu undo at cloud9.net
Tue Jan 15 12:52:01 EST 2002


JohnRule at aol.com wrote:
> 
>   Does anyone know how to open a socket with a message to call a function? I
> know that the "ACCEPT" (with message) can be used for ports, but what about
> sockets?
> 
>   What I want is for Revolution to call a function when I receive data on the
> open socket (this works fine with an open port), but I never get called with
> an open socket. I have to 'manually' get the data. I can poll an open socket
> for data, but even when using the send command, it still affects system
> performance. I don't mind getting the data manually (I'm getting kind of
> spoiled I guess with Revolution doing everything for me), but the performance
> is terrible. I think it is the combination of the "SEND" commands (every 100
> ms), and all of the read requests from the socket buffer that is doing
> it...is there another way?

You can open socket with message but you still need to read the data
coming in.

open socket x with message "getdata"

on getdata x
read from socket x for <line, length, num of chars, etc.>
end getdata

> 
> Thanks,
> JR
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution

-- 
__________________________
 Regards, Andu



More information about the use-livecode mailing list