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

[REBOL] Re: Problem: Talking from Rebol to Rebol via socket

From: sqlab:gmx at: 23-Feb-2009 11:31

Here is your example with some minor changes, that should work. rebol [] c-port: 12345 listen: open/no-wait join tcp://: c-port waitports: [listen] print "Listening:" forever [ ; wait until something happens either same? listen connection: wait waitports [ print [tab "Connected"] c-client: first connection append waitports c-client ] [ print [tab "Read message from c-side"] print copy connection print [tab "Send answer to c-side"] insert connection "r-side" print [tab "Closing socket"] close connection ] ] rebol [] connection: open/no-wait tcp://localhost:12345 insert connection "r-side-client" while [data: copy connection] [probe data] close connection halt Robert M. Münch wrote: