Home Forums Support Exception in PeerDiscovery on Android Reply To: Exception in PeerDiscovery on Android

#2412
Anonymous
Inactive

Hi Matt,
thank you very much for your fix, now discovery works on Android, too.
But it seems to have the side effect that it’s no more possible to start listening like this:
Connection.StartListening(ConnectionType.TCP, new IPEndPoint(IPAddress.Any, 39113));

That raises the Exception: System.Net.Sockets.SocketException: Address already in use

or after it is handled by NetworkComms

{networkcomms.netmsSetupShutdownException: It was not possible to open port #39113 on 0.0.0.0. This endPoint may not support listening or possibly try again using a different port.
  at NetworkCommsDotNet.Connections.TCP.TCPConnectionListener.StartListening (System.Net.EndPoint desiredLocalListenEndPoint, Boolean useRandomPortFailOver) [0x00147] in c:\Users\Karnifexx\Documents\Visual Studio 2010\Projects\networkcomms.net\NetworkCommsDotNet\Connection\TCP\TCPConnectionListener.cs:132 
  at NetworkCommsDotNet.Connections.Connection.StartListening[IPEndPoint] (NetworkCommsDotNet.Connections.ConnectionListenerBase listener, System.Net.IPEndPoint desiredLocalEndPoint, Boolean useRandomPortFailOver) [0x000bb] in c:\Users\Karnifexx\Documents\Visual Studio 2010\Projects\networkcomms.net\NetworkCommsDotNet\Connection\ConnectionListeners.cs:182 
  at NetworkCommsDotNet.Connections.Connection.StartListening[IPEndPoint] (ConnectionType connectionType, System.Net.IPEndPoint desiredLocalEndPoint, Boolean allowDiscoverable) [0x0010c] in c:\Users\Karnifexx\Documents\Visual Studio 2010\Projects\networkcomms.net\NetworkCommsDotNet\Connection\ConnectionListeners.cs:88 }

If PeerDiscovery is enabled or not doesn’t matter and just on Android.