[Pdx-pm] how to make a sleepy socket?

Eric Wilhelm scratchcomputing at gmail.com
Thu Mar 15 17:33:27 PDT 2007

Hi all,

I'm using HTTP::Server::Simple and wondering if it's possible to create 
an arbitrary connect latency without putting one computer in Australia.

The process seems to go socket(), bind(), listen(), accept().  But, it 
appears that the OS is being very helpful in queuing connections such 
that overriding accept and taking a wee nap doesn't do the trick (the 
client connect happens under the hood before accept()?)

Any thoughts?  Is there a way to do this in Perl?

But as soon as you hear the Doppler shift dropping in pitch, you know
that they're probably going to miss your house, because if they were on
a collision course with your house, the pitch would stay the same until
impact. As I said, that's one's subtle.
--Larry Wall

More information about the Pdx-pm-list mailing list