adding a modded example from beej's guide to network programming...