From: michi1@michaelblizek.twilightparadox.com (michi1 at michaelblizek.twilightparadox.com)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Problem with a UDP server implements
Date: Sat, 15 Oct 2011 11:01:42 +0200 [thread overview]
Message-ID: <20111015090142.GB2282@grml> (raw)
In-Reply-To: <CAOe6JY3Nj4POBZzgmA=VBCnGiQtHzRKiPYfsY7mBpsuYRmWhFQ@mail.gmail.com>
Hi!
On 16:29 Sat 15 Oct , tao jiang wrote:
> michi:
>
> 1.
> Is that to create two sockets
> and one bind to 10.0.0.1 the other bind to 10.0.0.2
> then use epoll wait these two sockets ?
Yes, exactly.
> 2.
> Is there any way to find out the turple like TCP
> then the UDP server can reply with exactly the ip it recieved the
> client's request ?
You should receive the packet only on the socket which is bound to the
address. You can save the bind address somewhere, so you know the local
address. You will know the client address because it is passed back by
recvfrom.
-Michi
--
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com
next prev parent reply other threads:[~2011-10-15 9:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-14 17:51 Problem with a UDP server implements jiangtao.jit
2011-10-15 6:04 ` michi1 at michaelblizek.twilightparadox.com
2011-10-15 8:29 ` tao jiang
2011-10-15 9:01 ` michi1 at michaelblizek.twilightparadox.com [this message]
2011-10-15 9:50 ` tao jiang
2011-10-15 11:58 ` Bernd Petrovitsch
2011-10-17 23:26 ` tao jiang
2011-10-18 9:20 ` Bernd Petrovitsch
2011-10-18 14:48 ` tao jiang
2011-10-19 7:28 ` Bernd Petrovitsch
2011-10-21 13:07 ` tao jiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111015090142.GB2282@grml \
--to=michi1@michaelblizek.twilightparadox.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.