Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i cannot get SocketID.. im getting socket id null . #45

Open
udaysuddhala opened this issue Nov 23, 2017 · 4 comments
Open

i cannot get SocketID.. im getting socket id null . #45

udaysuddhala opened this issue Nov 23, 2017 · 4 comments
Labels

Comments

@udaysuddhala
Copy link

udaysuddhala commented Nov 23, 2017

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?

@hideflolife
Copy link

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.

@udaysuddhala
Copy link
Author

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

@mattqs mattqs added the bug label Nov 28, 2017
@udaysuddhala
Copy link
Author

img_20171128_114342
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

@GMetaxakis
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants