c# - Install System.Net.Sockets on xamarin forms pcl -


i have problem. need use tcpclient on xamarin forms, "system.net.sockets" won't install. can not use nuget install it.

the error is.:

could not install package 'system.net.sockets 4.3.0'. trying install package project targets '.netportable,version=v4.6,profile=profile44', package not contain assembly references or content files compatible framework. more information, contact package author.

enter image description here

on ios , android projects able install, on portable project won't install.

how solve problem ?

thanks

you should try this plugin

a tpc listner

var listenport = 11000; var listener = new tcpsocketlistener();  // when connections, read byte-by-byte socket's read stream listener.connectionreceived += async (sender, args) =>  {     var client = args.socketclient;       var bytesread = -1;     var buf = new byte[1];      while (bytesread != 0)     {         bytesread = await args.socketclient.readstream.readasync(buf, 0, 1);         if (bytesread > 0)             debug.write(buf[0]);     } };  // bind listen port across interfaces await listener.startlisteningasync(listenport); 

otherwise can try implement socket in platform specific code..


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -