in reply to Re^2: Socket Questions
in thread Socket Questions

When you post sentences like this:

That is, I can't seem to keep sending the receivign.

...you have more important things to worry about than learning perl sockets.

However, when dealing with sockets you have to realize that the data you send over a socket can be broken up into many chunks, and you can't know ahead of time how many chunks there will be. As a result, the other side(e.g. the server) has to know when to stop waiting for chunks of data to arrive and that your transmission is complete. Should the server stop trying to receive data after receiving one chunk of data? What if your data got broken up into three chunks? Should the server stop trying to receive data after reading three chunks? What if your data got sent in only one chunk? Then the server will wait indefinitely for two other chunks to arrive

Because you can't know how many chunks your message will get broken into, you have to send some kind of signal to the server that it has read the end of your message. Is the server waiting until it reads "GOOGLEPLEX" before considering the transmission complete? Or, maybe its "THE END"? Did you add either of those to the end of the data you sent to the server?

I suggest that before you try to interact with a remote server that you write your own server program to interact with your client program. Then you will hopefully see the issues involved in trying to determine when the other side has finished transmitting data.

In the event you consider that too much bother, you have to realize that in order to communicate with a remote server, you have to know what 'protocol' the server expects you to use. That is, among other things, you must know what character(s) the server expects you to use to signal the end of your message.