select not receiving packets when then have been sent. (Perl)

From: Cameron Kerr (cameron.kerr_at_paradise.net.nz)
Date: 08/12/03


Date: Tue, 12 Aug 2003 16:29:06 +1200

I have a Perl network application that I need to get finished soon. It
uses a simple TCP message protocol, whereby messages are separated by
\r\n, and messages can go both ways over the connection.

It works fine most of the time, but sometimes (most often when a few
messages have been sent (the messages are quite small, btw), select does
not return (I have verified that it is the select system call that does
not return by using strace on the server.)

I know the packets have crossed the network (by using Ethereal and its
Follow TCP Stream feature), and so have reached the recipient TCP, but it
hasn't reached the client app.

My server app lets me send a chat message to the clients in the same
connection, and if I do that the backlog of messages on the client gets
read, including the chat message.

Some platform details
Using IO::Socket and IO::Select with Perl 5.8.0 on Debian Testing, Linux
2.4.21

I welcome any useful suggestions that may help me track this problem down.
I'm pretty sure I shouldn't be using TCP_NODELAY, and indeed, I am not.

-- 
Cameron Kerr
cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/
Empowered by Perl!


Relevant Pages

  • select not receiving packets when then have been sent. (Perl)
    ... I have a Perl network application that I need to get finished soon. ... Follow TCP Stream feature), and so have reached the recipient TCP, but it ... hasn't reached the client app. ...
    (comp.unix.programmer)
  • Re: flush socket buffer
    ... When you use TCP, you have effectively signed a contract to let TCP handle ... With autoflush off, Perl batches up it's data before sending it to the ... With autoflush on, Perl ... doesn't batch up it's data before sending it to the kernel. ...
    (comp.lang.perl.misc)
  • Using Perl to create TCP/ActiveX object?
    ... I plan to use Perl to create an ActiveX control that will be used to ... communicate with a device over TCP and be used in a ...
    (comp.lang.perl.misc)
  • Re: About the name PNNTP
    ... but to "tack-on" NNTP at the end... ... WTF is that? ... Perl Network News Transfer Proticol? ...
    (news.software.readers)
  • Re: Where do I start?
    ... Having developed apps in a couple of languages including perl, ... state that perl can process data from different sources very well, ... it files, tcp, db etc. ...
    (comp.os.linux.development.apps)