Added an extend method which combines network and socket object