Socket-based client and server networking