Quantcast
Channel: SuperWebSocket, a .NET WebSocket Server
Viewing all 564 articles
Browse latest View live

New Post: After a couple round-trip connection closes with Protocol Error

$
0
0
Hi!

I'm using SuperWebSocket on a console application to host my server, I'm connecting with chrome.

My server starts sending a "LOGIN" message.
The client open up a form for the user to login, if the user clicks on sign up, it sends a "SignUp" message, and receives a "SignUp <guid>" message back with a guid.
At this moment if I click cancel and click sign up again (to send another "SIGNUP" message to the server, I'm expecting to get another "SIGNUP <guid>" message back, but instead I'm getting a protocol error and losing my connection.

No message on the error log, only a message on DEBUG saying a protocol error occurred.

Can anyone help me?

Thanks!

New Post: After a couple round-trip connection closes with Protocol Error

$
0
0
On my tests I found out that the second time I call send from my webpage, it doesn't matter what text I'm sending or if I got a response or not, my connection will break with Protocol Error.

New Post: Windows 8

$
0
0
Any reason why our dotnet winforms app with superwebsockets doesn't work on windows 8 but works on windows 7?

New Post: Using SuperWebSocket with socket.io (engine.io) or sock-js.

$
0
0
Hi.

I run samples of SWS and try to use libraries like socket.io or sock.js and none of them works.
I use Chrome and something like simple samples:
<script src="engine.io.js"></script>
<script>
    var socket = new eio.Socket('http://172.17.0.91:2012', {rememberUpgrade: true});
    socket.on('open', function ()
    {
        console.log("opened");
        socket.on('message', function (data)
        {
            console.log(data);
        });
        socket.on('close', function ()
        {
            console.log("closed");
        });
    });

</script>
or
<script src="http://cdn.sockjs.org/sockjs-0.3.js"></script>

    <script>
        var sock = new SockJS('http://localhost:2012/',{debug:true});
        sock.onopen = function ()
        {
            console.log('open');
        };
        sock.onmessage = function (e)
        {
            console.log('message', e.data);
        };
        sock.onclose = function ()
        {
            console.log('close');
        }
    </script>
First of all, there is no message in Chrome console (in case if sock-js I see only close message). Meanwhile WebSockets directly works great,
var sock = new WebSocket('ws://localhost:2012/');
and so on.

What can be the cause of these libraries to not work properly, should I setup something special for SWS? Or the best practise to work with SWS is only with WebSocket browser object (in any) directly?

Thanks in advance.

New Post: Using SuperWebSocket with socket.io (engine.io) or sock-js.

$
0
0
It seems, that I resolved issue in part of engine-io. It has it's own protocol which should be supported on the
server side. Nonetheless, I can use this lib only with websocket transport (provided in options). And it doesn't work with long polling -- it stucks, because first it tries to use long polling.
Do you plan to support long polling?

New Post: Certificate is required in this security mode

$
0
0
HELLO,
I try to develop a websocket server with "wss" support using SuperWebSocket, setup fail and got the certificate error,
and the error log is "2014-07-29 12:24:13,048 [4416] ERROR SuperWebSocket - Certificate is required in this security mode!",
has anything wrong in certificate config..?
below is the part of the code...
Thanks for you help....
this.appServer = new SuperWebSocket.WebSocketServer();

            SuperSocket.SocketBase.Config.IRootConfig _rootConfig;
            SuperSocket.SocketBase.Config.IServerConfig _serverConfig;
            _rootConfig = new RootConfig(); 
           
            _serverConfig = new ServerConfig() {
                Name = "SuperWebSocket",
                Ip = "Any",
                MaxConnectionNumber = 1000,
                Mode = SocketMode.Tcp,
                Port = 2012,
                ClearIdleSession = false,
                ClearIdleSessionInterval = 86400,
                ListenBacklog = 1000,
                ReceiveBufferSize = 1024,
                SendBufferSize = 1024,
                KeepAliveInterval = 1,
                KeepAliveTime = 55,
                Security = "tls"
                Certificate = new SuperSocket.SocketBase.Config.CertificateConfig
                                               {
                                                   StoreName = "MY",
                                                   Thumbprint = "580502b3efe8274191794565716eae01486bd454"

                                               }
            };
           
            SuperSocket.SocketEngine.SocketServerFactory f = new SuperSocket.SocketEngine.SocketServerFactory();

appServer.Setup(_rootConfig, _serverConfig, f);
           

New Post: SuperWebsocket With 3G Problem

$
0
0
Dear ALL ;

I wrote a superwebsocket Console Application on the server side and I use jquery connection from the client side , I was working fine until I disconnect the Wifi and I conected it by 3G , that is not websocket issue , its the telecom Provider issue I think , But i believe there is way out .

So kindly advice me what steps should I follow to get it work over 3G and 4G connection.

Regards...

New Post: Using SuperWebSocket with socket.io (engine.io) or sock-js.


Source code checked in, #e1ea85e6659111e07c5ea36782e36998d52f2aa3

New Post: Using SuperWebSocket with socket.io (engine.io) or sock-js.

Commented Unassigned: Handshake failure [12415]

$
0
0
Hi,

I get socket handshake failure randomly. Here is the stack trace

Unexpected error
System.IO.IOException: The handshake failed due to an unexpected packet format.
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.SslStream.BeginAuthenticateAsServer(X509Certificate serverCertificate, Boolean clientCertificateRequired, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState)
at SuperSocket.SocketEngine.AsyncStreamSocketSession.BeginInitStream(AsyncCallback asyncCallback)
at SuperSocket.SocketEngine.AsyncStreamSocketSession.SuperSocket.SocketEngine.INegotiateSocketSession.Negotiate()


Also, I am getting send attempt failure frequently in my production environment. Stack tress:

System.TimeoutException: The sending attempt timed out
at SuperSocket.SocketBase.AppSession`2.InternalSend(ArraySegment`1 segment)
at SuperSocket.SocketBase.AppSession`2.Send(Byte[] data, Int32 offset, Int32 length)
at SuperWebSocket.WebSocketSession`1.SuperWebSocket.IWebSocketSession.SendRawData(Byte[] data, Int32 offset, Int32 length)
at SuperWebSocket.Protocol.DraftHybi10Processor.SendPackage(IWebSocketSession session, Int32 opCode, Byte[] data, Int32 offset, Int32 length)
at SuperWebSocket.Protocol.DraftHybi10Processor.SendMessage(IWebSocketSession session, Int32 opCode, String message)
at SuperWebSocket.Protocol.DraftHybi10Processor.SendMessage(IWebSocketSession session, String message)
at SuperWebSocket.WebSocketSession`1.Send(String message)
at TwilioApplication.Source.Helper.WebSocketHelper.SendMessageToAll(String message) in D:\Projects\Twilio\trunk\TwilioApplication\TwilioApplication\Source\Helper\WebSocketHelper.cs:line 98

Thanks!!
Comments: Hi Kerry, For the second one, I changed sendingQueueSize to 10, still getting lots of these errors. Does the sendingQueueSize has to be even larger?

New Post: Certificate is required in this security mode

New Post: Windows 8

New Post: After a couple round-trip connection closes with Protocol Error

New Post: _server_NewSessionConnected Net getting called


New Post: After a couple round-trip connection closes with Protocol Error

$
0
0
Yes I did, as I mention on my original post:
"No message on the error log, only a message on DEBUG saying a protocol error occurred. "

New Post: node.js

$
0
0
can the SuperWebSocket be used as a websocket client to connect to node.js and socket.io v1 and later?

New Post: How to deploy LiveWebChat example?

$
0
0
I upload LiveWebChat directory to a site and when I try to run it, there is a runtime error.
Tells me to customErrors's mode to off. But when I do that, nothing changes.

So... anybody?

New Post: SuperWebSocket.dll to use with SuperSocket 1.6.3

$
0
0
Hello,

Which version of SuperWebSocket.dll should I use if I want it work with the latest version of SuperSocket binaries (1.6.3)? The latest SuperWebSocket.dll binary available to direct download is version 0.8 from June 2013.
Or should I download the code from GitHub and compile it myself?

Thanks.

New Post: How to deploy LiveWebChat example?

Viewing all 564 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>