public void Disconnect() { if (!Connected) { throw new Exception("No connection to sever!"); } DebugHelperUnity.Log($"Disconnected from {ConnectedBundle}"); ConnectedBundle.DisjoinPort(this); ConnectedBundle = null; }
public void Connect(WireBundle bundle) { if (Connected) { throw new Exception($"Disconnect the existing bundle '{ConnectedBundle}' first!"); } ConnectedBundle = bundle; bundle.JoinPort(this); DebugHelperUnity.Log($"Connected to {bundle}"); }