Websocket issue

Could anyone help me out please.

I've created a web application where trades are made by users on the Binary.com platform. I use the websocket (WebSocket4Net) in a C# environment. I don't want to receive ticks etc. I only need to buy contracts.

Now I've created it like this. When the users logs in by oauth I open the websocket and keep it open. The user can make his trades. But after a couple of hours I get the error:
A call to SSPI failed, see inner exception. System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> System.ComponentModel.Win32Exception: The message received was unexpected or badly formatted --- End of inner exception stack trace --- at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) at SuperSocket.ClientEngine.SslStreamTcpSession.OnAuthenticated(IAsyncResult result)

Am I using the websocket right? Or should I open the socket, make a trade and close the socket? Could anyone please advise.

Comments

Sign In or Register to comment.