From: Kero Date: 2005-01-15T19:26:10+09:00 Subject: Re: TCPSockets slooooooow > It's not at "accept" time, it's really about 20 seconds for each line. When > the server says "HELLO\r\n", the client takes 20 seconds until it returns > from "gets" with that line. TCP does some timeout stuff, so actively talking in both directions gives you slow throughput on remote machines. I've seen 25 exchanges per second, typically (Linux, HP-UX). But 20 seconds sounds... broken... Try other progamming languages on the suspect machine or a reinstall of the OS (it is windows, you say below; I don't run windows, and I don't know about this particular flavour.) > In my eyes, this sounds like a timeout issue - only when a timeout occurs, > the "gets" returns. > > I read about a patch needed for 1.8.1 about nonblocking connect() somewhere > in the INet, but it did not sound as if it helps for my gets() problem. > > What I did find out in the meantime: this only happens if the server task > runs on my NT4 machine - another machine (Win2K) reacts fast. So I guess I > can run the server task on a different machine and be happy. Yet I'd like to > know the reason... You may want to try the TCP_NODELAY option (that's what got me above the 25 exchanges per seconds). -- wanna keep developing software? http://swpat.ffii.org/ +--- Kero ----------------------- kero@chello@nl ---+ | all the meaningless and empty words I spoke | | Promises -- The Cranberries | +--- M38c --- http://httpd.chello.nl/k.vangelder ---+