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.


In reply to Re^3: Socket Questions by 7stud
in thread Socket Questions by packetstormer

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.