A few example codes for network programming