UDP mode not working 1.5.3

Apr 25, 2014 at 8:43 PM
I am using 1.5.3 version of supersocket, setting the socketmode to UDP but from javascript client not able to connect to the server.
Error it is giving undefined.
But earlier i was able to use it with older of socket library don't remember the version.
My firewall is off & set the port also open, don't know whether environment setup problem or some setting i am missing in the configuration of socket.
dev environment is C#.

var config = new ServerConfig();
        config.Port = 4000;
        config.Ip = "Any";
        config.MaxConnectionNumber = 10000;
        config.MaxRequestLength = 100000;
        config.Mode = SocketMode.Udp;
Coordinator
Apr 26, 2014 at 2:23 PM
Of course cannot.

WebSocket protocol only can go over TCP.
Apr 27, 2014 at 2:36 AM
But to get better performance over slow netowork needed udp protocol support also for our application, It was working in previous versions?
Is there any way we can enable it or udp complete support is removed?
Coordinator
Apr 27, 2014 at 6:49 AM
NO.

WebSocket is defined on TCP, please refer to:
http://tools.ietf.org/html/rfc6455

The option for SocketMode.Udp is for generic SuperSocket usage, not for SuperWebSocket.

And any browser (Chrome, Firefox, etc) doesn't support websocket over udp.
Apr 28, 2014 at 3:26 AM
Thanks for the response Kerry,

But i didn't get what is the difference b/w supersocket & superwebsocket ?
then i think previously what i used is supersocket which worked in udp & supported by both chrome & mozilla browsers.
so which kind of application supersocket can be used & where superwebsocket.
my application client is browser & server is c# mvc module hosted on IIS.



Coordinator
Apr 28, 2014 at 4:26 AM
SuperSocket can support UDP and TCP, because it is generic protocol server. You can develop your own protocol server by SuperSocket to support TCP and UDP at the same time.

But SuperWebSocket is a websocket server base on SuperSocket, the websocket protocol only can go through TCP (limited by internet communication tech something you cannot understand). You can set SocketMode to UDP for your SuperWebSocket server, but the browsers always talk to the server using TCP, because the RFC(rfc6455) define the websocket must use TCP. So the browser connections always failed because you cannot use tcp client to connect a UDP server. Yes, you also can develop a client to support websocket protocol in the UDP, but you still cannot fix the issue of browsers.

In other word, let websocket support UDP is not a business of SuperWebSocket or SuperSocket.
Apr 28, 2014 at 9:16 PM
Thanks for the clarification kerry.

Is this support removed recently or it was not working from beginning?

why i am asking this because i think almost 6 months back i was able to use your library in udp mode & browser also it was working.

So after 6 months gap i am trying now & it is not working, so was worried whether environment setup issue or the library one.

and i didn't get the difference b/w supersocket & superwebsocket, how can i switch over from superwebsocket to supersocket.
Marked as answer by kerryjiang on 4/28/2014 at 7:32 PM
Coordinator
Apr 29, 2014 at 3:32 AM
"why i am asking this because i think almost 6 months back i was able to use your library in udp mode & browser also it was working. "

It is impossible!

If you change to SuperSocket, you'll lose the connectivity on the web.
Apr 29, 2014 at 7:13 PM
Yes I am sure about it, whether it was a loophole in browser in that specific version don't know.
but i was able to communicate on udp mode b/w browser & websocket server.
so after a gap i don't see that behavior now, so may we need to drop that feature of using udp for data exchange.
thanks for the clarification.