in reply to IO::Socket::INET what to use to read/write from socket?

I'm not an expert in Perl networking but I would say that you can use <$socket> for simple text/line based protocols (like basic HTTP client/server), and use read($socket, $data, $bufsize) for "binary" protocols and to get more control on the flow of information with non blocking I/O for example ...
BTW, I'm also waiting for comments from experienced monks on this subject :)
  • Comment on Re: IO::Socket::INET what to use to read/write from socket?

Replies are listed 'Best First'.
Re: Re: IO::Socket::INET what to use to read/write from socket?
by Joost (Canon) on May 29, 2002 at 13:08 UTC
    Well, I've used <$socket> calls for 'semi-binary' protocols: i've had to interface with a server that sends messages wrapped in \02 .. \03 characters, so I just set $/ to "\03" and read complete messages using <$socket>

    This still only works when you can use blocking calls (i.e. request/response protocols) though.

    -- Joost downtime n. The period during which a system is error-free and immune from user input.