UDP Datagram Reply Issue

Hello Everyone....
I'm doing a project in which i need to send datagrams to clients waiting on particular port. I want the client to reply to the server's port from which the datagram is sent. Is this possible ?
I have tried this by creating a DatagramSocket with empty constructor and sent the packet to the particular port on client. In turn, on receiving the packet from the server, the client sends the reply to the port got from received DatagramPacket's getPort method.. But, I'm not getting the packet back to the server.
Please help me...
Thanking you in advance...
R. Kaja Mohideen

Received DatagramPacket already has source address and port set, so you could simply do:
packet.setData(.....);
socket.send(packet);

Similar Messages

  • Identifying the Destination Address of a Received UDP Datagram

    I have a application where a potentially large number of IP addresses route to a single host. I need to listen for UDP datagrams on that host, and to be able to determine the IP address to which any received datagrams were originally sent. Unfortunately, the DatagramPacket API only appears to let me query the source address of the datagram, even though the destination addrerss is most certainly present in the actual UDP datagram.
    This seems like an oversight in the API. Has anyone encountered this problem before? Are there any known solutions? I am afraid I will have to resort to JNI.

    I know as well as you that the address returned is what was bound to. But he mentioned no where that he was only bound and listening on the default. As far as either of us knows he may be listening to specific addresses on a number of threads and funneling all packets through a single "queue" (not that this would be efficient). If he is doing something to that effect, then this will work. It could also be that he has extended a class to do the listening with a specific method that determines where to forward the packets to and that method is trying to inspect the Packets to determine where they go, so that it does not need a predefined bind address, but can work independently after a thread spun-off with serversocket.accept. Both scenarios make the socket.getLocalAddress an acceptable solution.
    As they say, there is more than one way to skin a cat.
    Instead of attacking, ask simply why that advice was given, or say simply that under "these" circumstances that would not be a workable solution. Do not simply attack me out of your perceived notion of my intelligence level. I will admit I should have a made a few qualifiers to the advice given, but that did not make it fundamentally wrong.

  • Using Multicast to send a UDP Datagram

    hey,
    i am implementing a kind of descovering mode on a mobile application.
    there for i wanna send a udp datagram to a configured multicast adress.
    unfortunately i didn't find anything useful on the net. is it even possible ?
    also to listen on this address ?
    thx for help

    Not possible!

  • Broadcast large UDP datagrams between VLANs

    Hello,
    I wish to broadcast large UDP packets between two VLANs (on the one set of stacked 3750 switches).
    I have setup an ip helper which allows me to broadcast between vlans. That works fine, but I am limited to datagrams around 5912 bytes in size.
    I want to be able to broadcast larger datagrams.
    I can successfully broadcast larger datagrams (65000-ish bytes) within the one vlan, but not between two vlans.
    Am I able to increase the size of broadcast UDP datagrams between vlans and if so, how?
    Thanks in advance.

    Disclaimer
    The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
    Liability Disclaimer
    In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
    Posting
    Hmm, I'm wondering whether a helper cannot forward fragments.
    If not, if you enable jumbo support on the 3750, you might be able to send larger diagrams, but perhaps not larger than MTU.

  • Receiving UDP datagrams?

    Hello,
    I have a C library I've been using for a while which allows text
    messages to be embedded unto UDP datagrams and sent from one
    application to another over a local Ethernet. I've used it for several
    years with no problems.
    At the moment, I'm trying to take one of the application which uses
    this library, and send some of its results over the network to a
    Labview application. I've been trying to start by looking at the
    udpex.lib example VI's, and loading the Spray Receiver VI.
    I figured that if I set the Spray Receiver's port number to the same
    port as I'm broadcasting messages to, then I should see the messages
    that are being passed around. However, I don't- the receiver always
    times out. Similarly, if I use the Spray Sende
    r to broadcast to the
    same port as I'm listening to, I would expect to receive a datagram in
    my C code, but nothing appears.
    Running the Spray Sender and Spray Receiver VI's together seems to
    work fine- I see the messages bouncing back and forth between them.
    I'm pretty sure I have the port numbers and other parameters set
    appropriately, but I'm stumped as to why I'm getting no indications of
    messages passing back and forth between the Labview and C sides. Can
    anyone suggest anything to look for, particularly something that might
    help someone who (at least, thinks) knows the win32 UDP well, but is
    just getting started with LabView?
    Thanks,
    Les Elkins
    Spatial Inttegrated Systems, Inc.

    Dennis Knutson wrote in message news:<[email protected]>...
    > All I can say is that I once used the LabVIEW VIs to connect to a UDP
    > write written in Visual Basic just by using the UDP Open and UDP Read
    > functions. I looked back at my old code and saw that the only thing I
    > did was change the max size and timeout values. I don't know about
    > Spray Sender or Spray Receiver VIs. Where did you find them?
    The Spray Sender and Spray Receiver VI's are examples for an Application
    Note on TCP/IP and UDP. I don't have the full title at hand, but the note
    is referenced in the UDP section of the manual.
    This certainly looks like something that should 'just work', but I'm not there yet...
    Thanks,
    Les Elkins

  • MimeMessage.reply() issue with MS Exchange Server 2007 Emails

    I have an application that retrieves emails from an MS Exchange Server 2003 mailbox. The data from each message is read, validated and conditionally loaded to a table. If the message doesn't pass validation, a rejection email is sent back to the sender with an error message and a copy of the email. (We're using Java 1.5. However, I test with both 1.5 and 1.6.)
    Also, if the message passes validation, positive notification is sent back to the sender.
    Both processes use the method: javax.mail.Message.reply()It's coded as:
    MimeMessage reply = (MimeMessage) message.reply(false);My organization is in the process of migrating to MS Exchange Server 2007. We've found that the reply() method no longer finds the sender method, thus unable to create a reply message. The error message we receive is:
    javax.mail.SendFailedException: No recipient addresses
         at javax.mail.Transport.send0(Transport.java:110)
         at javax.mail.Transport.send(Transport.java:80)
         at org.ccci.gms.datacollector.DataCollector.sendReply(DataCollector.java:514)
         at org.ccci.gms.datacollector.DataCollector.processMessages(DataCollector.java:162)
         at org.ccci.gms.datacollector.DataCollector.main(DataCollector.java:101)After creating the MimeMessage object from the reply() method, I printed out the email header detail from both 2003 and 2007 messages. You'll note from below that the "To" or recipient address is missing from Server 2007.
    MS Exchange 2003 works fine
    From: [email protected]
    To: [email protected]
    Subject: Re: Report
    In-Reply-To: <[email protected]>MS Exchange 2007 no longer works
    From: [email protected]
    Subject: Re: Reports
    In-Reply-To: <[email protected]>I know I could just use the "addRecipient()" method to get around this problem. I wanted to know if anyone has encountered this issue. Please share the resolution. Any suggestions will be greatly appreciated.
    Thanks,
    LaelW

    When the original message is accessed using IMAP, the reply method uses the information in the
    IMAP ENVELOPE to determine where to send the reply. It first looks for the Reply-To address
    in the ENVELOPE, then the From address.
    Interestingly, when not using IMAP, the getFrom method returns the Sender header if the From
    header is empty. The IMAP-specific code doesn't do that, although perhaps it should.
    It would be interesting to compare the ENVELOPE data from the protocol trace in the two cases.
    The ENVELOPE data will follow this syntax:
    envelope     = "(" env-date SP env-subject SP env-from SP
              env-sender SP env-reply-to SP env-to SP env-cc SP
              env-bcc SP env-in-reply-to SP env-message-id ")"
    So it's the first three address fields after the Subject that are relevant. If the From and Reply-To
    fields are NIL, but the Sender field has a valid address, let me know. I should probably fix the
    IMAP provider to fall back to the Sender field if the From field is missing.

  • CISCO  Gigabit switch / Java UDP datagram

    Hi,
    1. I experience flooding of UDP packets and machine freeze when put rate is high. Using java MulticastSocket and Datagrams.
    2. Tested with 2 machines to be in same multicast group, observerd that packets go to all other machines also which are not in multicast group.
    Enabled IGMP snooping on CISCO switch but same problem. Looks like IGMP forwarding table is not correct.
    Any help?
    Thanks

    1. I experience flooding of UDP packets and machine freeze when put rate is high. Using java MulticastSocket and Datagrams. Freeze at the sender or the receiver?
    2. Tested with 2 machines to be in same multicast group, observerd that packets go to all other machines also which are not in multicast group.That's correct. Multicasts will go to all hosts behind a given router. What they won't do is go through the router, unless the router thinks there's a member on the other side.

  • Muse Contact form reply issues

    Can anyone help with this issue.
    Thank you for contacting Adobe.
    A representative will be with you shortly. 
    Thank you for your patience.
    While you wait, you can try our community forums where experts are available 24 hours a day, 7 days a week.
    You are now chatting with Sonam.
    Vicky Quick: The contact form for Muse sites doesn't allow my clients to reply to the person who contacted them. It puts their address in the top requiring them to cut and paste the person requesting information. How can I change the reply to field in the contact form and is that even an option? If not do you offer a work around? I've put this question on the forum and no one has an answer. PLEASE HELP!
    Sonam: Hi, welcome to Adobe
    Sonam: Vicky, is your site hosted via BC, or a 3rd party hosting provider?
    Vicky Quick: I have one on BC and one on godaddy both do not work
    Vicky Quick: The contact form works, but the reply back doesn't
    Vicky Quick: hello?
    Sonam: Vicky, this feature is not available via Muse or BC. Kindly share the link to your forum post, I shall forward it to the product team and ask them to get back to you at the earliest.
    Sonam: If there is a work around, or if it is possible with any customization, the product team shall help you with it.
    Vicky Quick: I have put it on the forum as well as third party sites like muse-themes.com and they don't have answer either
    Sonam: Kindly share the link to your forum post
    Vicky Quick: How do I share the link?
    Sonam: Copy and paste to this chat

    As Anshul has suggested , this needs a Customer Case Management system , where your client can reply directly to submitters email.
    With BC this is possible enabling CST( Customer Service Ticketing ) , you can define role responsible as which users should receive the submission emails and then reply to customers directly from email client used.
    Level responses can be used such as First level with escalation level. Enabling this , form submission will create a case which will then get converted into a web case and will be triggered into role responsible mailboxes. Site users(your client) can directly reply to the customer from any email client used using this method.
    In case you are using external server , you can use any third party ticketing system and setup on the email to which notifications are received.
    Currently , with Muse when form is setup with email . Submitters form submission notification is received from that email and submitters email is included in subject line , which you can use manually to send email replies.
    Thanks,
    Sanjit

  • UDP Nat Traversal Issue

    Hey folks, have a 5505 with sec+ behind some public IP's for an Avaya remote VoIP SIP application on Android/iOS mobile. No SBC at current time and trying to get the app through a 5505 for both UDP/RTP and TCP (presence, chat, etc). All TCP ports seem to be following the NAT translation just fine, but my RTP streams are having an issue (no audio in either direction). All TCP traffic for the same mobile voip application is working just great via NAT (this traffic goes to an internal server with an object in the ASA titled UC-Server). Ironically, Avaya video conferencing and the same style of NAT also works just fine for RTP via NAT. 
    The voip app guide says 54000-54500 for the RTP stream and that this should be forwarded internally to the IP phone system (IP-Office is our object in the ASA) when hitting the public IP dedicated to external VoIP (object of UC-Public). I have attached a wireshark of the outside interface (inbound & outbound traffic) of the RTP traffic on the 5505. I also have a screenshot of the nat rule on the GUI side and CLI side.
    Here's the kicker, we created a NAT rule identical to the 54000-54500 rule but with the other side of the conversation (9578 on this call example) and audio was perfect in both directions. However, we noticed that depending on how the remote voip client is connected to the internet (whether on 4g or wifi, etc) the other side of the port range (not the 54000-54500) can change by a large margin. I really don't want to just snag all possible ports moving in the other direction as they change dynamically and by a wide range.
    I am not sure why the existing NAT statement is not working and the return traffic wont just follow the open socket?

    I am still confused on why creating the "client side" nat rule would cause any effect on this scenario? The ASA should be seeing the return port traffic on the 54000-54500 range. When comparing other wireshark traffic to this, the flow is setup proper and the port direction wireshark shows is proper as well. 
    Thoughts?

  • How to make udp datagram pass thru proxy server?

    I have to make a video stream system. And I found that there are a lot of user is behind the firewall or proxy server, how should i do to make the udp streaming media pass thru the firewall or proxy????
    does the https tunnel help?

    Thanks for your advise, but does http tunnel only accept for the TCP problem? since my server will broadcast a stream of udp to the user, so how should i do that?

  • How to make rtp udp datagram pass thru proxy server?

    I have to make a video stream system. And I found that there are a lot of user is behind the firewall or proxy server, how should i do to make the udp streaming media pass thru the firewall or proxy????
    does the https tunnel help?

    Tunnelling with HTTP is the only way.

  • Quick Reply issues

    quick reply is not working at all on my iphone 5?
    i slide down and no reply box comes, and on lock screen i can just delete a notification,
    what can i do to fix this or atleast have the option to use the function?
    please help.
    shane

    Reset the iPhone

  • Email account reply issues

    We have 3 email accounts for our family members. When I send an email from my account I choose "sent from my account name" but when people reply to my email the replies go to another account, even when I choose my account as the "reply to" account.
    As a result I can't access replies to my emails on my iPod as they go into another account that belongs to another family member.
    Plus there is no privacy!
    Any suggestions? Your help is appreciated.
    Lee-AnnfromOttawa

    Check the outgoing mail server settings in your account on the Treo and see if it is set for your yahoo account.
    Make sure it is not set for the Hotmail account.
    Click on the following link to the kb.palm.com webpage for the article regarding How to set up a POP/IMAP account on Windows Mobile 6.1.
    http://www.palm.com/cgi-bin/cso_kbURL.cgi?ID=14909
    If you still have problems, create a new account on the Treo for your yahoo account and delete the current account.
    For reference purposes, click on the following link for the support page for your device on the kb.palm.com webpage.
    http://kb.palm.com/wps/portal/kb/na/treo/800w/sprint/home/page_en.html
    There are links on the page to the user guide, troubleshooting, how to's, downloads, etc.

  • RV016 (V3) tcp and udp outgoing traffic issue

    Hi everyone.
    I've got a CISCO RV016 connected to a tooway SAT modem and need  to reach another router connected in DSL
    I need to make a TCP connection on port 8080 with my audio codec to reach the other side, and get audio.
    I do not feel comfortable with all the security process, firewall, forwarding port and so on ...
    What do I need to do to make the RV016 let the TCP out ?
    do I need to create rules ?  do I need to modify the firewall factory settings ?
    does UDP outgoing traffic need some rules too ?
    Thank's for your help.
    Nicolas.
    System Information
    Serial Number :  NKS16450006
    Firmware Version :  v4.2.1.02 (Jan 18 2012 14:10:55)
    PID VID :  RV016 V03
    Firmware MD5 Checksum :  a9817f2dbdcbd6a5c109eaa21b1c3545
    LAN  Working Mode :  Gateway

    Hi Nicolas, thank you for using our forum, my name is Johnnatan I am part of the Small business Support community. If you want other method instead forwarding I could advise you One-to-one NAT. I will share a document to you regarding this configuration.
    http://www6.nohold.net/CiscoSB/Loginr.aspx?login=1&pid=2&app=search&vw=1&articleid=544
    I hope you find this answer useful
    “Please rate useful posts so other users can benefit from it”
    Greetings, 
    Johnnatan Rodriguez Miranda.
    Cisco Network Support Engineer.

  • Mobile e mail reply issue/why when i chose reply this is the only thing i get

    on my mobile device, i try to reply to a e mail and  i get a blank page ...what is wrong with this and 

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"
    Reload web page(s) and bypass the cache.
    * Press and hold Shift and left-click the Reload button.
    * Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    * Press "Cmd + Shift + R" (MAC)

Maybe you are looking for

  • I have a problem when a generate a jsp page

    I hope some one can help me i generate a application module with jdeveloper release 3.1 So when i try to run my application module with jsp i found the next error.. I don't know why.. Error Message: JBO-25222: Unable to create application module. Err

  • Problem in Finder, can't open folders, icons missing text

    Sometimes when I connect a USB3 external drive, if I double click it on the desktop, it opens a Finder window but it's totally blank/empty, as if the drive is empty (which it's not). If I close and reopen a few times, eventually the content shows up,

  • PhSp_CS2_English.exe  error message, "required privilege is not held by client"

    I bought Photoshop 7, then CS2 several years ago.  I got a message about activation and followed the instructions but I can't open the downloaded file to reinstall.  Whatever the Required Privilege is, I don't know.  But I wonder if it has anything t

  • ITunes Inexplicably Shuts Down (Anyone Else?).....

    For the past few weeks my iTunes has inexplicably shut down. Most times, I can get it going after 2 or 3 start-ups to the point where I can download off of a CD or get the updates for my podcasts. However, I cannot get to the Music Store or the Podca

  • T500 with intel gma 4500mhd, increase system video memory

    Hi, I'm curious if there is a way, to increase my system video memory from the default 96mb, to 128mb or more, sience I still have 1155mb shared system memory. In a few case I would prefer more than 96, but there no increase option in bios nor in the