public void Init(IPAddress ipAddress, int port) { Port = port; IpAddress = ipAddress; _destination = new IPEndPoint(ipAddress, port); _oscClient = new OscClient(_destination); _oscClient.Connect(); IsInitialize = true; }
public void Start(OscPacket packet) { Assert.ParamIsNotNull(packet); mOscClient = new OscClient(Destination); mOscClient.Connect(); packet.Client = mOscClient; mCancellationTokenSource = new CancellationTokenSource(); mSendPacketsTask = Task.Run(() => SendPacketsAsync(packet, mCancellationTokenSource.Token)); }
public void Start(OscPacket packet) { Assert.ParamIsNotNull(packet); mOscClient = new OscClient(Destination); mOscClient.Connect(); mPacket = packet; mPacket.Client = mOscClient; mSendMessages = true; mTransmitterThread = new Thread(RunWorker); mTransmitterThread.Start(); }
public void Initialize(Wiimotes wiimotesObj) { sSendMessages = true; if (TransportType == TransportType.Tcp) { sOscClient = new OscClient(Destination.Address, Destination.Port); sOscClient.Connect(); } _sourceEndPoint = new IPEndPoint(IPAddress.Loopback, Port); wiimotesObj.RecordingStartedEvent += new Wiimotes.OnRecordingStartedEvent(OnRecordingStartedEvent); wiimotesObj.RecordingCompletedEvent += new Wiimotes.OnRecordingCompletedEvent(OnRecordingCompletedEvent); Thread serverThread = new Thread(RunWorker); serverThread.Start(); }