private void SetupLogger() { //Telepathy.Logger.Log = Logger.Log; Telepathy.Logger.Log = msg => Logger.Log("[Telepathy] " + msg); Telepathy.Logger.LogWarning = msg => Logger.Warn("[Telepathy] " + msg); Telepathy.Logger.LogError = msg => Logger.Error("[Telepathy] " + msg); }
bool IServerTransportLayer.Start(int port) { if (_server == null) { Logger.Warn("Server transport was never initialized and thus can't be started."); return(false); } return(_server.Start(port)); }
bool IClientTransportLayer.Connect(string address, int port) { if (_client == null) { Logger.Warn("Client transport was never initialized and thus can't connect."); return(false); } _client.Connect(address, port); return(_client.Connected || _client.Connecting); }