Added SocketManager class