Simple networking in C