mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-21 06:59:17 +00:00
Revert UDPListener back to non async version
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="monoandroid71" />
|
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="monoandroid71" />
|
||||||
<package id="NETStandard.Library" version="2.0.3" targetFramework="monoandroid81" />
|
<package id="NETStandard.Library" version="2.0.3" targetFramework="monoandroid81" />
|
||||||
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="monoandroid81" />
|
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="monoandroid81" />
|
||||||
<package id="Splat" version="7.0.1" targetFramework="monoandroid81" />
|
<package id="Splat" version="7.0.8" targetFramework="monoandroid81" />
|
||||||
<package id="System.AppContext" version="4.3.0" targetFramework="monoandroid71" />
|
<package id="System.AppContext" version="4.3.0" targetFramework="monoandroid71" />
|
||||||
<package id="System.Collections" version="4.3.0" targetFramework="monoandroid71" />
|
<package id="System.Collections" version="4.3.0" targetFramework="monoandroid71" />
|
||||||
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="monoandroid71" />
|
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="monoandroid71" />
|
||||||
@@ -36,11 +36,11 @@
|
|||||||
<package id="System.Net.Primitives" version="4.3.0" targetFramework="monoandroid71" />
|
<package id="System.Net.Primitives" version="4.3.0" targetFramework="monoandroid71" />
|
||||||
<package id="System.Net.Sockets" version="4.3.0" targetFramework="monoandroid71" />
|
<package id="System.Net.Sockets" version="4.3.0" targetFramework="monoandroid71" />
|
||||||
<package id="System.ObjectModel" version="4.3.0" targetFramework="monoandroid71" />
|
<package id="System.ObjectModel" version="4.3.0" targetFramework="monoandroid71" />
|
||||||
<package id="System.Reactive" version="4.1.3" targetFramework="monoandroid81" />
|
<package id="System.Reactive" version="4.1.5" targetFramework="monoandroid81" />
|
||||||
<package id="System.Reactive.Core" version="4.1.3" targetFramework="monoandroid81" />
|
<package id="System.Reactive.Core" version="4.1.5" targetFramework="monoandroid81" />
|
||||||
<package id="System.Reactive.Interfaces" version="4.1.3" targetFramework="monoandroid81" />
|
<package id="System.Reactive.Interfaces" version="4.1.5" targetFramework="monoandroid81" />
|
||||||
<package id="System.Reactive.Linq" version="4.1.3" targetFramework="monoandroid81" />
|
<package id="System.Reactive.Linq" version="4.1.5" targetFramework="monoandroid81" />
|
||||||
<package id="System.Reactive.PlatformServices" version="4.1.3" targetFramework="monoandroid81" />
|
<package id="System.Reactive.PlatformServices" version="4.1.5" targetFramework="monoandroid81" />
|
||||||
<package id="System.Reflection" version="4.3.0" targetFramework="monoandroid71" />
|
<package id="System.Reflection" version="4.3.0" targetFramework="monoandroid71" />
|
||||||
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="monoandroid71" />
|
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="monoandroid71" />
|
||||||
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="monoandroid71" />
|
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="monoandroid71" />
|
||||||
|
|||||||
@@ -79,22 +79,22 @@
|
|||||||
<HintPath>..\packages\Acr.Settings.9.0.1\lib\monoandroid80\Acr.Settings.dll</HintPath>
|
<HintPath>..\packages\Acr.Settings.9.0.1\lib\monoandroid80\Acr.Settings.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Splat">
|
<Reference Include="Splat">
|
||||||
<HintPath>..\packages\Splat.7.0.1\lib\monoandroid81\Splat.dll</HintPath>
|
<HintPath>..\packages\Splat.7.0.8\lib\monoandroid81\Splat.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Reactive">
|
<Reference Include="System.Reactive">
|
||||||
<HintPath>..\packages\System.Reactive.4.1.3\lib\netstandard2.0\System.Reactive.dll</HintPath>
|
<HintPath>..\packages\System.Reactive.4.1.5\lib\netstandard2.0\System.Reactive.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Reactive.Core">
|
<Reference Include="System.Reactive.Core">
|
||||||
<HintPath>..\packages\System.Reactive.Core.4.1.3\lib\netstandard2.0\System.Reactive.Core.dll</HintPath>
|
<HintPath>..\packages\System.Reactive.Core.4.1.5\lib\netstandard2.0\System.Reactive.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Reactive.Interfaces">
|
<Reference Include="System.Reactive.Interfaces">
|
||||||
<HintPath>..\packages\System.Reactive.Interfaces.4.1.3\lib\netstandard2.0\System.Reactive.Interfaces.dll</HintPath>
|
<HintPath>..\packages\System.Reactive.Interfaces.4.1.5\lib\netstandard2.0\System.Reactive.Interfaces.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Reactive.Linq">
|
<Reference Include="System.Reactive.Linq">
|
||||||
<HintPath>..\packages\System.Reactive.Linq.4.1.3\lib\netstandard2.0\System.Reactive.Linq.dll</HintPath>
|
<HintPath>..\packages\System.Reactive.Linq.4.1.5\lib\netstandard2.0\System.Reactive.Linq.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Reactive.PlatformServices">
|
<Reference Include="System.Reactive.PlatformServices">
|
||||||
<HintPath>..\packages\System.Reactive.PlatformServices.4.1.3\lib\netstandard2.0\System.Reactive.PlatformServices.dll</HintPath>
|
<HintPath>..\packages\System.Reactive.PlatformServices.4.1.5\lib\netstandard2.0\System.Reactive.PlatformServices.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Xamarin.Android.Support.Annotations">
|
<Reference Include="Xamarin.Android.Support.Annotations">
|
||||||
<HintPath>..\packages\Xamarin.Android.Support.Annotations.28.0.0.1\lib\monoandroid81\Xamarin.Android.Support.Annotations.dll</HintPath>
|
<HintPath>..\packages\Xamarin.Android.Support.Annotations.28.0.0.1\lib\monoandroid81\Xamarin.Android.Support.Annotations.dll</HintPath>
|
||||||
|
|||||||
+5
-5
@@ -30,11 +30,11 @@
|
|||||||
<package id="System.Net.Primitives" version="4.3.0" targetFramework="xamarinios10" />
|
<package id="System.Net.Primitives" version="4.3.0" targetFramework="xamarinios10" />
|
||||||
<package id="System.Net.Sockets" version="4.3.0" targetFramework="xamarinios10" />
|
<package id="System.Net.Sockets" version="4.3.0" targetFramework="xamarinios10" />
|
||||||
<package id="System.ObjectModel" version="4.3.0" targetFramework="xamarinios10" />
|
<package id="System.ObjectModel" version="4.3.0" targetFramework="xamarinios10" />
|
||||||
<package id="System.Reactive" version="4.1.3" targetFramework="xamarinios10" />
|
<package id="System.Reactive" version="4.1.5" targetFramework="xamarinios10" />
|
||||||
<package id="System.Reactive.Core" version="4.1.3" targetFramework="xamarinios10" />
|
<package id="System.Reactive.Core" version="4.1.5" targetFramework="xamarinios10" />
|
||||||
<package id="System.Reactive.Interfaces" version="4.1.3" targetFramework="xamarinios10" />
|
<package id="System.Reactive.Interfaces" version="4.1.5" targetFramework="xamarinios10" />
|
||||||
<package id="System.Reactive.Linq" version="4.1.3" targetFramework="xamarinios10" />
|
<package id="System.Reactive.Linq" version="4.1.5" targetFramework="xamarinios10" />
|
||||||
<package id="System.Reactive.PlatformServices" version="4.1.3" targetFramework="xamarinios10" />
|
<package id="System.Reactive.PlatformServices" version="4.1.5" targetFramework="xamarinios10" />
|
||||||
<package id="System.Reflection" version="4.3.0" targetFramework="xamarinios10" />
|
<package id="System.Reflection" version="4.3.0" targetFramework="xamarinios10" />
|
||||||
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="xamarinios10" />
|
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="xamarinios10" />
|
||||||
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="xamarinios10" />
|
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="xamarinios10" />
|
||||||
|
|||||||
@@ -108,19 +108,19 @@
|
|||||||
<HintPath>..\packages\Acr.Settings.9.0.0\lib\xamarinios10\Acr.Settings.dll</HintPath>
|
<HintPath>..\packages\Acr.Settings.9.0.0\lib\xamarinios10\Acr.Settings.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Reactive">
|
<Reference Include="System.Reactive">
|
||||||
<HintPath>..\packages\System.Reactive.4.1.3\lib\netstandard2.0\System.Reactive.dll</HintPath>
|
<HintPath>..\packages\System.Reactive.4.1.5\lib\netstandard2.0\System.Reactive.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Reactive.Core">
|
<Reference Include="System.Reactive.Core">
|
||||||
<HintPath>..\packages\System.Reactive.Core.4.1.3\lib\netstandard2.0\System.Reactive.Core.dll</HintPath>
|
<HintPath>..\packages\System.Reactive.Core.4.1.5\lib\netstandard2.0\System.Reactive.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Reactive.Interfaces">
|
<Reference Include="System.Reactive.Interfaces">
|
||||||
<HintPath>..\packages\System.Reactive.Interfaces.4.1.3\lib\netstandard2.0\System.Reactive.Interfaces.dll</HintPath>
|
<HintPath>..\packages\System.Reactive.Interfaces.4.1.5\lib\netstandard2.0\System.Reactive.Interfaces.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Reactive.Linq">
|
<Reference Include="System.Reactive.Linq">
|
||||||
<HintPath>..\packages\System.Reactive.Linq.4.1.3\lib\netstandard2.0\System.Reactive.Linq.dll</HintPath>
|
<HintPath>..\packages\System.Reactive.Linq.4.1.5\lib\netstandard2.0\System.Reactive.Linq.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Reactive.PlatformServices">
|
<Reference Include="System.Reactive.PlatformServices">
|
||||||
<HintPath>..\packages\System.Reactive.PlatformServices.4.1.3\lib\netstandard2.0\System.Reactive.PlatformServices.dll</HintPath>
|
<HintPath>..\packages\System.Reactive.PlatformServices.4.1.5\lib\netstandard2.0\System.Reactive.PlatformServices.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Xamarin.Forms.Core">
|
<Reference Include="Xamarin.Forms.Core">
|
||||||
<HintPath>..\packages\Xamarin.Forms.3.6.0.293080\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
|
<HintPath>..\packages\Xamarin.Forms.3.6.0.293080\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ namespace qController
|
|||||||
public QReceiver(int port)
|
public QReceiver(int port)
|
||||||
{
|
{
|
||||||
Port = port;
|
Port = port;
|
||||||
|
udpListener = new UDPListener(port);
|
||||||
thread = new Thread(new ThreadStart(ListenLoop));
|
thread = new Thread(new ThreadStart(ListenLoop));
|
||||||
thread.Start();
|
thread.Start();
|
||||||
|
|
||||||
@@ -26,6 +27,7 @@ namespace qController
|
|||||||
|
|
||||||
public void ListenLoop()
|
public void ListenLoop()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
HandleOscPacket callback = delegate (OscPacket packet)
|
HandleOscPacket callback = delegate (OscPacket packet)
|
||||||
{
|
{
|
||||||
var messageReceived = (OscMessage)packet;
|
var messageReceived = (OscMessage)packet;
|
||||||
@@ -36,6 +38,17 @@ namespace qController
|
|||||||
};
|
};
|
||||||
|
|
||||||
udpListener = new UDPListener(Port, callback);
|
udpListener = new UDPListener(Port, callback);
|
||||||
|
*/
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
OscMessage messageReceived = null;
|
||||||
|
while(messageReceived == null)
|
||||||
|
{
|
||||||
|
messageReceived = (OscMessage)udpListener.Receive();
|
||||||
|
Thread.Sleep(1);
|
||||||
|
}
|
||||||
|
OnUpdateMessageReceived(messageReceived);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user