public void SetConnection(LocalConnection lc) { if (InMaintenance) { if (lc == null) { // Other party disconnected; swap Connection = TransferConnection; TransferConnection = null; InMaintenance = false; Program.MainForm.LogAppend("Migrated server!"); } else { TransferConnection = lc; } } else { Connection = lc; Connected = lc != null; Connections = 0; } }
public override void OnAccept(Socket pSocket) { LocalConnection connection = new LocalConnection(pSocket); connection.Init(); }