Create the first assignment: 'timeserver'

This commit is contained in:
Charles Descamps 2025-01-24 14:36:36 -07:00
parent bc6a19ff33
commit a54d88dc70
6 changed files with 92 additions and 0 deletions

33
timeserver/timeserver.c Normal file
View file

@ -0,0 +1,33 @@
// header files
#include "timeserver.h"
// constants
// timeserver port is 8888
#define TIMEPORT "8888"
// prototypes
// main function
int main(int argc, char **argv)
{
// initialize program (variables and structs)
// define a UDP socket
// bind the UDP socket to port 8888 / TIMEPORT
// while loop to see if the "time\r\n" has been received (recv call?)
// if "time\r\n" is received, then send() back the linux epoch.
// profit???
return 0;
}
// function definitions
/*
Name: ???
Process: ???
Function Input/Parameters: ???
Function Output/Parameters: ???
Function Output/Returned: ???
Device Input/Device: ???
Device Output/Device: ???
Dependencies: ???
*/