Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Java program to create CRC on sending and receiving UDP datagram

  1. #1
    Member
    Join Date
    Mar 2009
    Posts
    48
    Thanks
    3
    Thanked 2 Times in 2 Posts

    Default Java program to create CRC on sending and receiving UDP datagram

    Hi, How can I create CRC (Cyclic redundancy check - Wikipedia, the free encyclopedia) when i send and recive UDP datagram?

  2. The Following User Says Thank You to Koren3 For This Useful Post:

    arya (November 6th, 2019)


  3. #2

    Default Re: DatagramPacket CRC

    Koren I see you are working a lot with datagrams. I'm not an expert but I'll do my best.

    Did you read something at the sun site? Lesson: All About Datagrams (The Java™ Tutorials > Custom Networking)

    Also you can read something about UDP checksum here and here

    And I've just read this paragraph answering a question:

    "Do I have to perform the check sum checking myself, or does the JVM, my OS or anything else discard any UDP datagrams with an invalid check sum?
    Verifying UDP checksums is a task for the UDP protocol driver, which is implemented in your operating system's network stack. You do not have to - nor can you - verify the UDP checksums on an UDP socket.
    Remember the network model is a layered one. TCP and UDP are layer 4; they are the transport layer, which takes care of transporting the data you send in the socket (which is therefore layer 5 and above). What you receive on a socket is what the other side sent through its own socket - just the layer 5 and above data."

    I hope this'll help you

  4. #3
    Member
    Join Date
    Mar 2009
    Posts
    48
    Thanks
    3
    Thanked 2 Times in 2 Posts

    Default Re: DatagramPacket CRC

    Yes thanks a lot!!!

  5. #4
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: DatagramPacket CRC

    Hey Koren3,

    If this has answered your question, please mark your thread as solved:

    How to mark your thread as solved
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.