Final Assignment in Computer Networking, programming a socket in C