Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7686985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:36:01+00:00 2026-05-31T19:36:01+00:00

I am testing the behaviour of some client software, and need to write some

  • 0

I am testing the behaviour of some client software, and need to write some software that emulates router-like functionality, preferably using something simple like UDP sockets. All it needs to do is receive the packet, alter the time to live, and send it back. Is this possible in regular Java? Or do you do something like the following:

  1. Listen on Socket A
  2. For EACH udp packet received, open a NEW socket, set time to live on that socket, and send it back (or this isn’t possible/efficient?)
  3. Receiver gets packet with altered values that appear like it has traversed some hops (but in reality hasn’t)

So two approaches may be possible – editing the recieved packet directly (and then simply sending back), or constructing a new packet, copying the values from the original one and setting the appropriate headers/socket options before sending it out.

EDIT: the ‘router’ does not do any complex routing at all such as forwarding to other routers… it is simply decrements the t-t-l header field of the received message and sends the message directly back to the client.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:36:02+00:00Added an answer on May 31, 2026 at 7:36 pm

    Please refer API of Socket and ServerSocket class. Most of the server implementation for variety of protocols does accept packets at standard port like 80 and send response using some ephemaral port.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm seeing some strange behaviour with my Rails3 app. Note that I'm using the
I'm looking for a way to emulate virus-like behaviour for testing exclusions in anti-virus
I'm testing some legacy code that extends the default php exception object. This code
I'm developing and testing a little straight-forward client-server application using java (and scala). The
I've written client code that's supposed to send some data through a socket and
I have a strange Behaviour issue with Sharepoint. I'm testing some javascript in the
I am seeing some strange behaviour testing for null value against a var type
I want to write some testscripts that create some files and execute commands that
I have a client-server application that utilises MSMQ and NServiceBus for messaging. During some
I've testing some new CLR 4.0 behavior in method inlining (cross-assembly inlining) and found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.