How to use sockets?
Andre Garzia
soapdog at mac.com
Sun Nov 7 19:06:32 EST 2004
LOL, Bjornke, you type faster than I do!!!!
Cheers
andre
On Nov 7, 2004, at 9:57 PM, Bjrnke von Gierke wrote:
>
> On Nov 07 2004, at 23:46, DJ Grumble wrote:
>
>> Hi,
>>
>> I am trying to make a simple chat client, however, I can't seem to
>> get the socket scripts to work. Can anyone provide a quick sample
>> script for sending the contents of a field (for the sender) and
>> recieving the contents of a field (for the reciever?) I must be doing
>> something wrong because I've read the docs 100 times.
>>
>> thanks
>> grum
>
> note: this is the hard way, with datagramm sockets its way simpler,
> but that's the way i would do it :)
>
> --server button:
> on mouseUp
> accept connections on port "8181" with message "incomming"
> end mouseUp
>
> on incomming remoteIP
> read from socket remoteIP until return with message "gotOne"
> end incomming
>
> on gotOne remoteIP theMessage
> put theMessage into field "Your field here"
> close socket remoteIP
> end gotOne
>
> --client field:
> on returnInfield
> open socket "localhost:8181" with message "contacted"
> end returninfield
>
> on contacted theIP
> write the text of me & return to socket theIP
> end contacted
>
> <>()<>()<>()<>()<>()<>()<>()<>()<>()<>()<>
>
> official ChatRev page:
> http://chatrev.cjb.net:8080
>
> Chat with other RunRev developers:
> go stack URL "http://homepage.mac.com/bvg/chatrev1.2.5.rev"
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
--
Andre Alves Garzia ð 2004
Soap Dog Studios - BRAZIL
http://studio.soapdog.org
More information about the use-livecode
mailing list