On 4/11/00 10:27 am, Xavier Bury <[EMAIL PROTECTED]> wrote:

> ok, but how do you read the info or request it?
> suppose you know the ip and port to use only?
> 
> does anyone have an explanation about how to read datagrams?
> how do you discover the protocol? is this necessary?
> 
> for example, i'd like to list quake servers available...
> how do you go about finding this out?
> 
> i've searched for possible info on the web but it's too polluted with
> scripts, tricks and tweaks...
> 
> a url will do surely!

These games all use their own protocols, you would have to have inside
information or some documentation to have any chance of figuring out how to
talk to them.  However, if you just want to try out sockets, a most basic
example (posted previously) would be:

> The following scripts work well for me in local one-machine tests. They
> require two stacks: a metacard "server" stack and the client stack. You will,
> of course, need to replace the "1.1.1.1" with your actual IP/domain name...
> 
> In the server, I put:
> 
> on openCard
> accept connections on port 8080 with message gotOne
> end openCard
> 
> on gotOne theSocket
> write "OK" to socket theSocket
> close socket theSocket
> end gotOne
> 
> In the client:
> 
> on openCard
> checkOnline
> end openCard
> 
> on checkOnline
> open socket to "1.1.1.1:8080" with message gotcha
> send "checkOnline" to this card in 10 seconds
> end checkOnline
> 
> on gotcha s
> read from socket s for 1 line
> if (it = "OK") then put "Looks like we are online at"&&(the long time)
> else answer "Looks like the server is not responding."
> close socket s
> end gotcha
> 
> on socketError
> answer "Looks like we are offline."
> end socketError

Regards,

Kevin

> im not refering to cgi's btw.
> 
> Thanks
> Xavier

Kevin Miller <[EMAIL PROTECTED]> <http://www.runrev.com/>
Runtime Revolution Limited (formerly Cross Worlds Computing).
Tel: +44 (0)131 672 2909.  Fax: +44 (0)1639 830 707.


Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to