コード例 #1
0
 public void Init(IPAddress ipAddress, int port)
 {
     Port         = port;
     IpAddress    = ipAddress;
     _destination = new IPEndPoint(ipAddress, port);
     _oscClient   = new OscClient(_destination);
     _oscClient.Connect();
     IsInitialize = true;
 }
コード例 #2
0
        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));
        }
コード例 #3
0
        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();
        }
コード例 #4
0
        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();
        }