Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

udp socket

i am using simple socket server. i have changed the code to udp socket.plz tell sendto is a blocking or unblocking call in the system

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    What operating system?

    The answer depends on the socket options. But blocking doesn't really make a lot of sense for a udp send. The function returns once the packet has been placed in the queue. The only thing that would make it block is if there wasn't enough space in the socket buffer. As it is udp the buffer empties itself quickly, there is no wait for acknowledge.