Connecting to the sample EchoService

Mar 1, 2012 at 7:39 AM

From the quickstart solution, I have compiled the sample SuperSocket.QuickStart.EchoService.dll service.

I then copied it into the QuickStart\EchoService\bin\Debug folder and ran the "RunServer.bat" file to launch the service.  I was greeted with the optimistic message:


Press any key to start server!
The server has been started! Press key 'q' to stop the server.


The following is my SuperSocket.SocketService.exe.config contents:

<?xml version="1.0" encoding="utf-8" ?>
        <section name="socketServer" type="SuperSocket.SocketEngine.Configuration.SocketServiceConfig, SuperSocket.SocketEngine"/>
        <add key="ServiceName" value="EchoService"/>
    <socketServer loggingMode="IndependantFile">
            <server name="EchoServer"
                 serviceName="EchoService" ip="Any" port="2012" mode="Async" maxConnectionNumber="10000">
            <service name="EchoService"
                     type="SuperSocket.QuickStart.EchoService.EchoServer, SuperSocket.QuickStart.EchoService" />
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />


I then created a javascript function so that I could test my service in google chrome:


    function RunTest() {
        //var wsUri = "ws://";
        var wsUri = "ws://localhost:2012/EchoServer/";

        var myWebSocket = new WebSocket(wsUri);
        myWebSocket.onmessage = function (evt) {
            console.log("message received: " +;
        myWebSocket.onopen = function (evt) {
            console.log("connection opened - sending request");



I have tried the following urls:


But none of them result in a successful test.  What URL should I be using?  Note that the test works fine when I try it agains the service (commented out above).








Mar 1, 2012 at 7:47 AM

Hi, I think you misunderstood something.

SuperSocket is not a websocket server, it is generic socket server framework.

What you should use is SuperWebSocket:

You can get it started by the sample SuperWebSocketWeb project.