Re: UDP Client Problem



hi
I know the port of my server an i am sending data successfully.
But my microcontroller (server using some other library to send and
receive), microcontroller wants to know the port an ip of remote host (means
client), this means i have to bind my client (in UDP) so that microcontroller
can send data to client.
Actually i am sending request from client (PC) to Server (Microcontroller)
and in return micocontroller is sending the required data to me.

Thanks for help in advance.
Bye


"Arkady Frenkel" wrote:

No, client have to know server's port and send to data to it, OTOH server
can check that when recvfrom() returned successfully
Arkady

"Muhammad Azeem Azam" <MuhammadAzeemAzam@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:0DEFA80C-16D3-49EC-8DDC-014C83E61039@xxxxxxxxxxxxxxxx
Hi
the problem is my server need to know the port of my client (that shold be
permanant?)
How can i know my port(getsockname() ?).
But i think i need to fix my port.
thanks


"Arkady Frenkel" wrote:

No, you don't need to bind client client both in UDP and TCP
Arkady

"Muhammad Azeem Azam" <MuhammadAzeemAzam@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote
in
message news:CBB58DCB-5207-40AF-9740-8516FCB68223@xxxxxxxxxxxxxxxx
Hi
I have to made a UDP client.
Do i ned to bind it or not.

My Server has following function for dending data to client
----------------------------
int NutUdpReceiveFrom ( UDPSOCKET * sock,
u_long * addr,
u_short * port,
void * data,
u_short size,
u_long timeout
)

Receive a UDP datagram.


Parameters:
sock Socket descriptor. This pointer must have been retrieved by
calling
NutUdpCreateSocket().
addr - IP address of the remote host in network byte order.
port - Remote port number in host byte order.
data - Pointer to the buffer that receives the data.
size - Size of the buffer that receives the data.
timeout - Maximum number of milliseconds to wait.

-------------------
But problem is its asking for the remote host IP Address and Port.
This menas i have to bind my client to specific port.
Am i right?

Thanks for help in advance
BYe






.



Relevant Pages

  • Re: Unable to print to networked printer - get access denied messa
    ... Check the permissions on the server assuming the client has a true RPC ... How is the Standard TCP/IP port configured for the device? ...
    (microsoft.public.windowsxp.print_fax)
  • Re: interfaces lo:1 lo:2 lo:3? (for remote ssh tunnels)
    ... That's the problem tunneling (port forwarding) solves. ... >>can't get past the client firewall. ... > I don't understand why the server would be making the ... server initiates another connection to the client -- in this ...
    (Debian-User)
  • Re: Remote Connection Issue
    ... through port number 3389 and a workstation on the LAN through port number ... I understand that you want to allow a LAN client ... and you have configured server publishing rule ... > By default Terminal Server and Windows 2000 Terminal Services uses TCP ...
    (microsoft.public.windows.server.sbs)
  • Re: UDP Client Problem
    ... When server received data with WSARecvFromit can check 6th parameter ( ... client, but be aware that in such case client will talk only with you server ... I know the port of my server an i am sending data successfully. ... But my microcontroller (server using some other library to send and ...
    (microsoft.public.win32.programmer.networks)
  • Re: RealVNC
    ... Default listening port for RealVNC server that runs on the machine on which ... Then there is default Java listening port on port 5800 on the client machine ...
    (microsoft.public.windows.server.sbs)

Loading