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

requiring data to be sent both ways across the connection

Sockets are bidirectional, so send data as you wish. What's the problem?

You say you know how to establish a connection, so presumably the problem you are having is with the handshaking you've said nothing about.

  • 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: Is it possible to create a socket client and server that can send information back and forth using IO::Socket?
by p4R4d0x (Initiate) on Oct 26, 2009 at 06:03 UTC

    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!

      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.

      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?