UDP Sockets in C

后端 未结 4 1095

I\'m working on a homework problem for class. I want to start a UDP Server that listens for a file request. It opens the file and sends it back to the requesting client with

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-05 23:43

    Keep in mind that UDP is connectionless. It only sends packets, and is not suitable for sending files - unless the entire content fit in one UDP packet.

    If you anyway want to send/receive UDP packets, you simply call sendto/recvfrom with the appropriate addresses.

提交回复
热议问题