UDP Sockets in C

后端 未结 4 1072

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条回答
  •  不知归路
    2021-01-05 23:49

    I have written a UDP server-client in C , where the client sends a registration number and the server gives a name as the feedback.

    SERVER

    0. Variable initialization
    1. sock()
    2. bind()
    3. recvfrom()
    4. sendto()
    

    CLIENT

    0. gethostbyname()
    1. sock()
    2. bzero()
    4. sendto()
    5. recvfrom()
    

    Hope it helps. You can find the example code here udp server/client

提交回复
热议问题