laziness, impatience, and hubris | |
PerlMonks |
Sockets: Client keeps waitingby toadi (Chaplain) |
on Jan 08, 2002 at 15:35 UTC ( [id://137098]=perlquestion: print w/replies, xml ) | Need Help?? |
toadi has asked for the wisdom of the Perl Monks concerning the following question:
Layout:
I have a server listening on a socket. Ready to spawn a single proces to run. Now I want a client to connect to the server, but immediatly disconnect. The server only starts one process and will only run another one when the first one is finished, regardless how many connects there are from the clients. So I don't want my clients to be waiting!!! A layout for a simple client(but it keeps waiting): what did I do to stop waiting I commented: #while ( <$remote> ) { print } But when 2 clients at the same time connect the server dies wit following error: Use of uninitialized value at /usr/local/lib/perl5/5.00503/sun4-solaris/Socket.pm line 295. Bad arg length for Socket::unpack_sockaddr_in, length is 0, should be 16 at /usr/local/lib/perl5/5.00503/sun4-solaris/Socket.pm line 295. I'm in desperared need of help, because my c program also gives the same error if I don't wait for a answer from the server... Probably I looked over someting abviously about client/server programming. But can someone with more experience on the subject enlighten me :) -- My opinions may have changed, but not the fact that I am right Edit title by tye
Back to
Seekers of Perl Wisdom
|
|