[En-Nut-Discussion] UDP Server Problem

Jose Vicente Sanchez Ortega jvsanchezo at gmail.com
Thu Feb 15 18:26:20 CET 2007


Hi:

You must implicitly define the address and port since both are input
parameters to NutUdpSendTo and NutUdpReceiveFrom (nobody will fill for you
this fields neither in Receive nor in Send.

Regards,



-----Mensaje original-----
De: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] En nombre de MUHAMMAD AZEEM
AZAM
Enviado el: jueves, 15 de febrero de 2007 18:20
Para: Ethernut User Chat (English)
Asunto: Re: [En-Nut-Discussion] UDP Server Problem

hi
   
  this means when i will call the 
  ---------------------
  NutUdpReceiveFrom() function
  its parametrs 
  addr will contain address of my client.
  and port will contain port of my client.
  --------------------------
  then i should use NutUdpSendTo() to send my data to the Port and addr that
i have received in NutUdpReceiveFrom() function.
  I don't need to implicitly define the address and port.
  like that 
  unsigned port = 400;
  unsigned ip = inet_addr("192.168.0.0");
   
  -------------------------------------------
  bye
Jose Vicente Sanchez Ortega <jvsanchezo at gmail.com> wrote:
  Hi, MUHAMMAD:

1) UDP is not a stream-oriented protocol (actually is a datagram-oriented
protocol) thus you cannot link an UDP socket with a stream. You must call
the respective functions (i.e. NutUdpReceiveFrom).

2) Yes, you are right.

Bes regards,


Jose Vicente.


-----Mensaje original-----
De: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] En nombre de MUHAMMAD AZEEM
AZAM
Enviado el: jueves, 15 de febrero de 2007 16:38
Para: en-nut-discussion at egnite.de
Asunto: [En-Nut-Discussion] UDP Server Problem

hi
I have to build a UDP Server
But

1) i can't assign stream to udp.
so will the string functions will work or not.
like 
strcpy
strcmp
2) int NutUdpReceiveFrom ( UDPSOCKET * sock, u_long
* addr, u_short * port, void * data, u_short
size, u_long timeout ) 

addr will contain the Ip address of my client(host) and port will contain
port of my client? 



---------------------------------
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion

_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion


 
---------------------------------
It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion




More information about the En-Nut-Discussion mailing list