Added connect and disconnect methods to server