i cannot get SocketID.. im getting socket id null .
udaysuddhala opened this issue · 4 comments
i working with xamarin forms. my .net framework is 4.5
here is my code.
var socket = new Socket(myurl);
socket.On(Socket.EVENT_OPEN, () =>
{
});
socket.Open();
string y = socket.Id;
im getting id=null
can anyone suggest me? what im doing wrong?
Not knowing your 'myurl' value - IIRC, you must have the protocol/prefix in front of 'myurl' - for example, '192.168.1.1' will not work, but 'http://192.168.1.1' should.
my url is the same like u have mentioned .. var socket = new Socket("http://10.175.8.65:1337/");
but im unable to get the ID
if i tried to download the plugin through nuget im getting the below error.
Severity Code Description Project File Line Suppression State
Error Could not install package 'EngineIoClientDotNet 1.0.3'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. 0
please help me
i reviewed the code and I saw that the id can be null if null returns the server, or if the server has emmited "close" so the socket is closed.
Check Socket.OnClose and you will see that there is where the value changes to null.