in reply to Re: Is it possible to create a socket client and server that can send information back and forth using IO::Socket?
in thread Is it possible to create a socket client and server that can send information back and forth using IO::Socket?

Sorry! To clarify the "handshaking," it's simply the server, once it receives a connection, tells the client "HELLO 1.0" and the client, if using version 1.0 will respond "HELLO 1.0" or "QUIT" if anything other than "HELLO 1.0" is received.

I currently have a side that is able to send, and a side that is able to received, but I can't seem to create a socket object using IO::Socket that can both send and receive data. Any help is appreciated!

  • Comment on Re: Is it possible to create a socket client and server that can send information back and forth using IO::Socket?

Replies are listed 'Best First'.
Re^2: Is it possible to create a socket client and server that can send information back and forth using IO::Socket?
by ikegami (Patriarch) on Oct 26, 2009 at 06:08 UTC

    I currently have a side that is able to send, and a side that is able to received

    You are mistaken. Sockets are bidirectional, which means both sides can send and receive.

Re^2: Is it possible to create a socket client and server that can send information back and forth using IO::Socket?
by cdarke (Prior) on Oct 26, 2009 at 08:45 UTC
    it's simply the server, once it receives a connection

    I wonder if you are trying to get things the wrong way around? Generally, assuming you are using SOCK_STREAM, the server waits on a connection and a first message from the client - it is usually the client who "speaks" first (it does not have to be anything deep and meaningful). The server then responds, and waits for a reply. Maybe you have both sides sending or recieving at the same time?