Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why "using Net.Sockets " is missing in dot42 C# android?

I'm trying to write a small chat over TCP/IP in dot42 using c#. The problem is the "Net.Sockets" is missing !! It's odd because it's part of the System in C#.

using System;
using Android.App;
using Android.Os;
using Android.Widget;
using Dot42;
using Dot42.Manifest;
using System.Net;
using System.Net.Sockets; // it is not recognized !
like image 420
JavadT Avatar asked May 12 '26 02:05

JavadT


1 Answers

eee already provided a solution for your problem. Let me try to answer the question "Why is System.Net.Sockets missing?".

As Bart points out, the Android API is available without limitations. The reason is that it is an automated conversion. So it is entirely available by design.

In contrast to the Android API, the .NET API is handcrafted on top of the Android API. For example, the .NET Dictionary class is implemented as a wrapper of java.util.Map and System.String as a wrapper of java.lang.String. In other words, we take the API from .NET but the implementation from Java. This is in contrast to Mono. You will see .NET types added in new releases.

like image 122
Frank Avatar answered May 13 '26 15:05

Frank



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!