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

Socket flush or forcing a tcp port update

 [1/2] from: koopmans::itr::ing::nl at: 7-Aug-2001 16:59


I have a small but annoying problem with tcp and Rebol: Say I have two consoles, 1>> and 2>> The server: 1>> a: open tcp://:8001 1>> b: first a 2>> c: open tcp://localhost:8001 1>> l: copy {lalalala} 1>> write-io b l 4 2>> copy c Gives a network time-out in c. Normally you'd open a port in direct mode, but I cannot do that for b. Setting no-wait doesn't help either, as well as no-delay to true. The only thing that works is inserting a lot of data in b 1>> loop 1000 [ write-io b l 6] Rugby has the same problem on some platforms: inserting a small message (all at once) and closing the port results (sometimes) in nothing being written over the port. So my question: is there an equivalent of a socket flush for tcp ports? --Maarten

 [2/2] from: holger:rebol at: 7-Aug-2001 9:50


On Tue, Aug 07, 2001 at 04:59:35PM +0200, Maarten Koopmans wrote:
> I have a small but annoying problem with tcp and Rebol: > Say I have two consoles, 1>> and 2>>
<<quoted lines omitted: 6>>
> 2>> copy c > Gives a network time-out in c. Normally you'd open a port in direct mode, but I cannot do that for b. Setting no-wait doesn't help either, as well as no-delay to true.
You have to open 'a in /direct and /no-wait mode, then 'b inherits that setting. Without those refinements the 'copy function waits until EOF is reached. -- Holger Kruse [holger--rebol--com]

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted