Re: Problem with a UDP server implements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



michi:

Thanks for your help.
Much appreciated.



2011/10/15  <michi1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>:
> 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
>

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux