void OnDestroy() { SWConsole.Verbose("FrameSyncDebugger OnDestroy"); _tcpConnection.OnConnectionEstablished -= _tcpConnection_OnConnectionEstablished; _tcpConnection.OnConnectionNewPacket += _tcpConnection_OnConnectionNewPacket; _tcpConnection.Stop(); _tcpConnection = null; }
public void Initialize(FrameSyncAgent agent) { _tcpConnection = new SWTCPConnection(); _tcpConnection.OnConnectionEstablished += _tcpConnection_OnConnectionEstablished; _tcpConnection.OnConnectionNewPacket += _tcpConnection_OnConnectionNewPacket; SWConsole.Verbose("FrameSyncDebugger Initialized"); _agent = agent; _tcpConnection.Connect(_host, _port); _initialzied = true; }