Wrote the network connection code for the frames