[FR][EN] Simple Chat Server on On-Rev ?

Jérôme Rosat jrosat at mac.com
Sat Oct 24 13:35:16 EDT 2009


Christian,

J'ai essayé d'utiliser des connexions "socket" dans une page .irev  
avec On-Rev, mais cela ne fonctionne pas. Paradoxalement, la commande  
ne génère pas d'erreur. J'ai demandé à l'équipe On-Rev s'il existait  
un exemple de chat, et voici la réponse:

"Thank you for your request. I have this response from our technical  
department.

In terms of examples, not sure if there's anything out there at the  
moment, but I could give a quick run through of how to write a simple  
chat server in iRev.
Though server side CGI scripts are not ideally suited to the task it  
would be possible.

If we were to consider a simple situation of a single chat room to  
which users can connect, post, and read other's messages... We would  
need a server side database that would store all the messages, when  
they were posted and who posted them. We could then write a simple  
iRev script that extracted all the messages from the database that  
have been posted after a given date. In this case, our client app  
would periodically call this script, passing the date as a parameter  
and formatting the returned result for display. Essentially, the  
client would be asking the server for all the messages that have been  
posted since we last asked. The client would remember the date-time it  
asked this question and then and use this the next time it asked. It  
would simply ask the question by using get URL http://path_to_my_script.com

The server script would also take two further parameters that would  
allow the client to post messages. This would be the user's name and  
their message. If the server script detected these parameters, the  
message would be written to the database and subsequently displayed in  
any future requests. So, if the user typed a message into the client.  
the client would simply include the message and the user's name as  
parameters in its next periodic request."

Jérôme

-- EN

Christian,

I tried to use “sockets” in a .irev page with On-Rev, but that does  
not work. Paradoxically, the command does not generate an error. I  
asked the team On-Rev if there was an example of chat, and and here  
the answer: (see above)

Jerome

Le 24 oct. 2009 à 15:10, Christian Langers a écrit :

> Hello,
>
>
> for my project I wanted to implement the simple chat server-client
>
> stacks (or a similar solution using sockets), but I really have no  
> idea
> how to start.
>
> I'm new to sockets... and I want to use my on-rev hosting service...
>
> Any help is appreciated :-)
>
> Christian
> Luxembourg
>



More information about the use-livecode mailing list