Other
Introduction
This project consists of a simple UDP server and client programs. If you've never written a program that uses UDP, this is an ideal starting project. The server runs on a local computer, waiting for a datagram request from a remote computer asking for the server's current time. The server then returns its current time to the client, which in turn displays it.
Background
UDP stands for User Datagram Protocol. The client sends a datagram to the server, which then processes the information and returns a response. This article demonstrates how to use the sendto
and recvfrom
functions.
The server program
The server program is a simple UDP server that waits for the datagram from clients. When it receives a datagram containing the text
c
No comment