アプリケーションでを使用しようとしてwebsocket
いますが、 を使用xamarin.android
してサーバーに接続できませんwebsocket class
。
WebSocket4net
NuGet パッケージを使用していますが、機能していません。
コード
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();