Add network module and connect function

Connect function has been added and allows to perform the connection to the network