Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] REBOL Internet Chess? Re:(3)

From: ole_f:post3:tele:dk at: 6-Aug-2000 15:16

If you read this, you are using an old mail reader. The solution if you have difficulty reading the rest of this mail is getting hold of newer, MIME-compliant software. --X=Boundary=X Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Wordwrap: 78 Hi Cal, 3-Aug-2000 you wrote: [...]
>>Now that you've got my >>wheels spinning, would it be >>possible to develop a >>real-time chat application in >>REBOL? I'm not talking about
[...]
> Sounds simple enough, I'll try to put one together when i'm back on a real
computer instead of the PalmPilot...
> A good place to look for ideas on how to write this would be %littlebell.r
(the telnet program) it should be helpful. littlebell only sends data when the user hits return, if I recall correctly. I had some problems sending/receiving backspaces, but I do not remember which problems. Some time ago I wrote a _very_ simple chat client and server that send the input character by character. (I also made a similar system which waits for the entire line.) They are attached. However, i've no idea whether or not this is the intended behaviour? BTW, the variables and the names of the scripts are in Danish - I didn't dare just changing the text here in my mail program without testing it, and I'm too tired to test it for real in REBOL now. Hope you can figure out what it does. ("Afsender": sender, "modtager": receiver, "portnummer": port number, servernavn : server name.) Start both programs without modification in separate consoles on the same machine to test it locally. Change the "portnummer" and "servernavn" variables to change the server name and port number.) Anyway, who am I kidding? This is probably not what anybody had in mind, but anyway... Kind regards, -- Ole Friis <[ole_f--post3--tele--dk]> Amiga is a trademark of Amiga Inc. --X=Boundary=X Content-Type: text/plain; charset=US-ASCII; name="Program3.r" Content-Transfer-Encoding: 7bit REBOL [ Title: "Snakkesystem 2 - afsender" ] portnummer: 30 servernavn: 127.0.0.1 a: open/binary join tcp:// [servernavn ":" portnummer] konsol: open/binary [scheme: 'console] bogstav: #" " while [bogstav <> #"*"] [ wait konsol bogstav: to-char pick konsol 1 either bogstav = #"^(back)" [ prin "^(back) ^(back)" ][ either (bogstav = #"^M") or (bogstav = #"^/") [ print "" ][ prin to-string bogstav ] ] append a bogstav ] close a --X=Boundary=X Content-Type: text/plain; charset=US-ASCII; name="Program4.r" Content-Transfer-Encoding: 7bit REBOL [ Title: "Snakkesystem 2 - modtager" ] portnummer: 30 a: open/binary join tcp://: portnummer b: first a while [(ind: pick b 1) <> none] [ bogstav: to-char ind either bogstav = #"^(back)" [ prin "^(back) ^(back)" ][ either (bogstav = #"^M") or (bogstav = #"^/") [ print "" ][ prin bogstav ] ] ] close b close a --X=Boundary=X--