Skip to content

GSimas/proj_arq

 
 

Repository files navigation

This is a small program that demonstrates basic communication using UDP sockets.

Before compiling it, you may want to edit port.h and set a
(hopefully unique for your environment) default port number
(in the range 1024...65535).

Then run make to compile it. It should work fine on linux or OS X systems.
(on solaris systems, you may need to add /usr/ccs/bin to your PATH environment)

1. Start the server
In one window, run
	./udp-recv

The server runs forever, listening for UDP packets on a port defined in port.h.
Each time a message is received, it is printed.
Break out of it via ^C (or whatever your interrupt character is).

2. Client
In another window, run the client:
	./udp-send

As it's written, the server's address is set to 127.0.0.1, a 
special address for the local host, so the client and server should be on
the same machine if you don't change the address.

Releases

No releases published

Packages

No packages published

Languages

  • C 97.7%
  • Makefile 2.3%