Hello mhirschb,

I just wanted to add something here regarding your title of your question.

You are writting UDP Client and Server in one. From my point of view if I understand correctly you think that Server is receiving your messages and client is replying back.

If this is the case it would be nice to read a similar question What is the difference between udp client and server?.

Answer given by sundialsvc4 from the question:

“The difference between a client and a server” has nothing to do with “UDP.” Rather, it has to do with the role that each program plays, in relation to one another. A “server” is any computer program that is primarily designed to talk to other computer programs, rather than to people. “Servers” often work by listening on network connections ... TCP/IP or UDP ... but some internal-only servers use other techniques such as named pipes. Many commercial servers support multiple modes of communication. Within CPAN, you will find substantial building-blocks for constructing server programs. If you look hard enough before “just diving in,” you’ll find that a great deal of your work has been done for you. The code is, by and large, very high-performance, reliable, and well tested.

I hope this clears things a bit, as NetWallah said start implementing your solution and repost and we will be more than happy to assist you with your solution.

Seeking for Perl wisdom...on the process of learning...not there...yet!

In reply to Re: UDP Client and Server in one by thanos1983
in thread UDP Client and Server in one by mhirschb

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.