0
J'essaie d'utiliser websocket
dans mon application xamarin.android
, mais je suis incapable de me connecter au serveur en utilisant websocket class
. Utilisation WebSocket4net
NuGet Package, mais cela ne fonctionne pasWebSocket ne fonctionne pas avec Xamarin.Android
code
WebSocket websocket = new WebSocket("ws://" + IPData[0].Trim() + ":" + IPData[1].Trim());
if (websocket.State != WebSocketState.None)
{
var videoIntent = new Intent(this, typeof(VideoActivity));
StartActivity(videoIntent);
}
else
{
new AlertDialog.Builder(this)
.SetPositiveButton("Ok", delegate
{
})
.SetTitle("Connection Error")
.SetMessage("Not Connect to server")
.Show();
}
})
.SetTitle("IP Updated")
.SetMessage("IP Info Updated Successfully")
.Show();