How can I avoid access error when calling TcpListener.Start () in iOS?

In my iOS application, I am trying to invoke an instance TcpListener. I define and start the listener as follows:

var listener = new TcpListener(IPAddress.Any, 104);
listener.Start();

However, I get the following exception when I run this code (iOS Simulator, iPhone, debug mode):

System.Net.Sockets.SocketException: access is denied in System.Net.Sockets.Socket.Bind (System.Net.EndPoint local_end) [0x00051] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net .Sockets / Socket.cs: 1111 in System.Net.Sockets.TcpListener.Start (Int32 backlog) [0x00022] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net.Sockets/TcpListener.cs : 259 in System.Net.Sockets.TcpListener.Start () [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net.Sockets/TcpListener.cs:239 on
...

Is there anything I can do to avoid Access denied error, or is it a built-in Mono runtime limit on Xamarin.iOS?

+4
source share
1

< 1024 . >= 1024. - , .

wikipedia DICOM, :

DICOM TCP UDP (IANA):

  • 104 DICOM (TCP) User Datagram Protocol (UDP). 104 , .
  • 2761 DICOM Integrated Secure Communication Layer (ISCL) TCP UDP
  • 2762 DICOM (TLS) TCP UDP
  • 11112 DICOM, , TCP UDP

, .

( , )

+5

All Articles