Gajo-

Wednesday, August 24, 2005, 4:10:06 PM, you wrote:

> So could someone please just type down the source of a simple server
> script? On the Runtime's site they say you can write a client/server with
> just a few lines, so I'm sure it's very simple, but I cannot figure it out.

Try something like this...

accept connections on port 5001 with message "PortOpened"

-- PortOpened is called when someone connects
on PortOpened theSender, sentMessage
  local theMessage

  -- get a command from the client
  put empty into theMessage
  repeat while "Quit" is not in theMessage
    read from socket theSender until cr
    put it into theMessage
    if theMessage is not empty then
      switch word 1 of theMessage
        -- do something with the message here
      end switch
    end if
  end repeat
end PortOpened

-- 
-Mark Wieder
 [EMAIL PROTECTED]

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to