Update network.py

sock is passed internally, and not as an object attribute.