Giter Site home page Giter Site logo

superwebsocket's Introduction

SuperWebSocket

SuperWebSocket is a .NET implementation of WebSocket server.

What is WebSocket?

WebSocket is a technology providing for bi-directional, full-duplex communications channels, over a single Transmission Control Protocol (TCP) socket. It is designed to be implemented in web browsers and web servers but it can be used by any client or server application. The WebSocket API is being standardized by the W3C and the WebSocket protocol is being standardized by the IETF. Please refer to http://en.wikipedia.org/wiki/WebSockets.

SuperWebSocket is being merged into SuperSocket as an additional module SuperSocket.WebSocket. You can use SuperSocket.WebSocket in the same way with SuperWebSocket but with a different namespace.

superwebsocket's People

Contributors

dagwaging avatar kerryjiang avatar yazgoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

superwebsocket's Issues

FileLoadException in AppServerBase.Setup()

I receive the following exception when setting up a new WebSocketServer:

ERROR - System.IO.FileLoadException: Could not load file or assembly 'log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a' at SuperSocket.SocketBase.Logging.Log4NetLogFactory..ctor(String log4netConfig) at SuperSocket.SocketBase.AppServerBase2.Setup(IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory, IReceiveFilterFactory1 receiveFilterFactory, ILogFactory logFactory, IEnumerable1 connectionFilters, IEnumerable1 commandLoaders) at SuperSocket.SocketBase.AppServerBase2.Setup(IServerConfig config, ISocketServerFactory socketServerFactory, IReceiveFilterFactory1 receiveFilterFactory, ILogFactory logFactory, IEnumerable1 connectionFilters, IEnumerable1 commandLoaders) at SuperSocket.SocketBase.AppServerBase2.Setup(Int32 port)`

This seems to be an issue with a version mismatch between the version of log4net specified in SuperSocket and the one specified in SuperWebSocket, and I think was due to a failure to update the project files when SuperSocket was updated to 1.6.4, but I have not yet found a fix.

Failed to register remoting access service! System.Runtime.Remoting.RemotingException: Failed to create an IPC Port: Access is denied.

Hi EveryOne, 

I am facing this issue. My use case is: 

I am running a Superwebsocket in a windows form application in windows server 2008 ( which is used by multiple user on share basis (remotely). So I intent to run this Window app for each user, hence superwebsocket (diff port). I am injecting the port number with bootstrap.initialize(EndpointDictionary);

But when I am running for second user I am getting this error: 

 DEBUG DefaultBootstrap - The server instance SecureSuperWebSocket has been initialized! 
 DEBUG DefaultBootstrap - The PerformanceMonitor has been initialized! 
 DEBUG DefaultBootstrap - The Bootstrap has been initialized! 
 ERROR DefaultBootstrap - Failed to register remoting access service! 
System.Runtime.Remoting.RemotingException: Failed to create an IPC Port: Access is denied. 

at System.Runtime.Remoting.Channels.Ipc.IpcServerChannel.StartListening(Object data) 
at System.Runtime.Remoting.Channels.Ipc.IpcServerChannel.SetupChannel() 
at System.Runtime.Remoting.Channels.Ipc.IpcServerChannel..ctor(String name, String portName) 
at SuperSocket.SocketEngine.DefaultBootstrap.RegisterRemotingService() 
at SuperSocket.SocketEngine.DefaultBootstrap.Initialize(Func`2 serverConfigResolver, ILogFactory logFactory) 


Any ideas ?? 
thanks in advance.

Reconnect the websocket session while browser reload or refresh

Hi,

The very first time browser window page load client will connect to web socket service.
Now, while page reload or refresh browser client have to connect the web socket service instead of creating new socket session for the same client. Let me know how to do that?

Thanks,
Palmani. K

Support TLS 1.1 and 1.2 in .NET 4.5

Hi Kerry,

I found out that a SuperWebSocket server only supports TLS 1.0 even on .NET 4.5 when I use security="tls" configuration.

I've checked with Wireshark that even on Windows Server 2012 R2 with .NET 4.5.2 the SuperWebSocket only supports up to TLS 1.0.

When I use WebSocket4Net as a client, the version is capped to 1.0 by the client. When I connected from browser JS, client hello contained version 1.2 but server responded with 1.0.
Custom test client/server app between two test servers (same configuration - WS 2012 R2, .NET 4.5.2) managed to use TLS 1.2, so it should be supported by the system and platform in question.

The tested SuperWebSocket version was a NuGet package 0.9.0.2

Thank you,
Honza

websocket client closing while connect with secured mode

I try some tests with SuperWebSocket (1.5.3.0)
Actually, the secure websocket client in Browser can't connect to server..???
My code in C#:
[code]
namespace SuperWebSocket.Samples.BasicConsole
{
class Program
{
static void Main(string[] args)
{
//Console.WriteLine("Press any key to start the WebSocketServer!");

                    //Console.ReadKey();
                    //Console.WriteLine();

        var appServer = new WebSocketServer();
                    var config = new RootConfig();
                    var serverConfig = new ServerConfig
                            {
                                    Name = "SecureSuperWebSocket",
                                    Ip = "Any",
                                    Port = 8089,
                                    Mode = SocketMode.Tcp,
                                    Security = "tls",
                                    Certificate = new SuperSocket.SocketBase.Config.CertificateConfig
                                    {
                                            FilePath = @"E:\AMIS\Labs\AlchemySSL\mtax.misa.local.pfx",
                                            Password = "12345678",
                                            //IsEnabled = true
                                    }
                            };



        //Setup the appServer
                    //if (!appServer.Setup(2012)) //Setup with listening port
                    if (!appServer.Setup(config,serverConfig ))
        {
            Console.WriteLine("Failed to setup!");
            Console.ReadKey();
            return;
        }

        appServer.NewMessageReceived += new SessionHandler<WebSocketSession, string>(appServer_NewMessageReceived);
                    appServer.NewSessionConnected += new SessionHandler<WebSocketSession>(appServer_NewSessionConnected);
                    appServer.SessionClosed += new SessionHandler<WebSocketSession, CloseReason>(appServer_SessionClosed);


        Console.WriteLine();

        //Try to start the appServer
        if (!appServer.Start())
        {
            Console.WriteLine("Failed to start!");
            Console.ReadKey();
            return;
        }

        Console.WriteLine("The server started successfully, press key 'q' to stop it!");

        while (Console.ReadKey().KeyChar != 'q')
        {
            Console.WriteLine();
            continue;
        }                       

        //Stop the appServer
        appServer.Stop();

        Console.WriteLine();
        Console.WriteLine("The server was stopped!");
        Console.ReadKey();
    }

            static void appServer_SessionClosed(WebSocketSession session, CloseReason value)
            {
                    Console.WriteLine(value);
            }

            static void appServer_NewSessionConnected(WebSocketSession session)
            {
                    foreach(var item in session.Items){
                            Console.WriteLine(item);
                    }
                    //appServer.BasicSecurity

                            Console.WriteLine(session.AppServer.BasicSecurity);
                            Console.WriteLine(session.AppServer.Certificate.ToString());


            }

    static void appServer_NewMessageReceived(WebSocketSession session, string message)
    {
        //Send the received message back
        session.Send("Server: " + message);
    }
}

}
[/code]
and my Javascript in page here
[code]
<script type="text/javascript">
var noSupportMessage = "Your browser cannot support WebSocket!";
var ws;

        function appendMessage(message) {
            $('body').append(message);
        }

        function connectSocketServer() {
            var support = "MozWebSocket" in window ? 'MozWebSocket' : ("WebSocket" in window ? 'WebSocket' : null);

            if (support == null) {
                appendMessage("* " + noSupportMessage + "<br/>");
                return;
            }

            appendMessage("* Connecting to server ..<br/>");
            // create a new websocket and connect
            ws = new window[support]('wss://localhost:8089/cho,moe,ga');

            // when data is comming from the server, this metod is called
            ws.onmessage = function (evt) {
                appendMessage("# " + evt.data + "<br />");
            };

            // when the connection is established, this method is called
            ws.onopen = function () {
                appendMessage('* Connection open<br/>');
                $('#messageInput').attr("disabled", "");
                $('#sendButton').attr("disabled", "");
                $('#connectButton').attr("disabled", "disabled");
                $('#disconnectButton').attr("disabled", "");
            };

            // when the connection is closed, this method is called
            ws.onclose = function () {
                    appendMessage('* Connection closed<br/>');
                    $('#messageInput').attr("disabled", "disabled");
                    $('#sendButton').attr("disabled", "disabled");
                    $('#connectButton').attr("disabled", "");
                    $('#disconnectButton').attr("disabled", "disabled");                        
            }
        }

        function sendMessage() {
            if (ws) {
                var messageBox = document.getElementById('messageInput');
                ws.send(messageBox.value);
                messageBox.value = "";
            }
        }

        function disconnectWebSocket() {
            if (ws) {
                ws.close();
            }
        }

        function connectWebSocket() {
            connectSocketServer();
        }

        window.onload = function () {
            $('#messageInput').attr("disabled", "disabled");
            $('#sendButton').attr("disabled", "disabled");
            $('#disconnectButton').attr("disabled", "disabled");
        }

...
[/code]
Could you please help me to solve this problem..??

现在已经正在使用此 SocketAsyncEventArgs 实例进行异步套接字操作

2015-11-07 15:20:56,556 [40280] ERROR PWSS:port_a.b.c.d - Session: d41f2306-e4fe-4cfc-a639-3651f9def6be/e.f.g.h:48747
Unexpected error
System.InvalidOperationException: "现在已经正在使用此 SocketAsyncEventArgs 实例进行异步套接字操作。";
在 System.Net.Sockets.SocketAsyncEventArgs.StartOperationCommon(Socket socket)
在 System.Net.Sockets.Socket.ReceiveAsync(SocketAsyncEventArgs e)
在 SuperSocket.SocketEngine.AsyncSocketSession.StartReceive(SocketAsyncEventArgs e, Int32 offsetDelta) 位置 \SuperSocket-master\SocketEngine\AsyncSocketSession.cs:行号 148

The object was used after being disposed.

Here is an exception thrown by SuperWebSocket when running with SSL. This looks like part of the code doesn't properly clean up after the timeout that occurs.

2015-07-08 16:17:35,256 INFO : Session: 0557800e-9421-4ba3-ae84-637300a33b85/10.10.81.11:41867
The session will be closed for 328.208082 timeout, the session start time: 7/8/2015 3:25:54 PM, last active time: 7/8/2015 4:12:07 PM!
2015-07-08 16:17:35,394 INFO : Session closing: ClientClosing
2015-07-08 16:17:35,395 ERROR: Session: 0557800e-9421-4ba3-ae84-637300a33b85/10.10.81.11:41867
Unexpected error
Caller: OnStreamEndRead, file path: d:\Kerry\Workshop\SuperSocket\v1.6\SocketEngine\AsyncStreamSocketSession.cs, line number: 164
System.IO.IOException: IO exception during read. ---> System.IO.IOException: BeginReceive failure ---> System.ObjectDisposedException: The object was used after being disposed.
at System.Net.Sockets.Socket.BeginReceive (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags socket_flags, System.AsyncCallback callback, System.Object state) [0x00000] in <filename unknow
n>:0
at System.Net.Sockets.NetworkStream.BeginRead (System.Byte[] buffer, Int32 offset, Int32 size, System.AsyncCallback callback, System.Object state) [0x00000] in :0
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.BeginRead (System.Byte[] buffer, Int32 offset, Int32 size, System.AsyncCallback callback, System.Object state) [0x00000] in :0
at Mono.Security.Protocol.Tls.SslStreamBase.InternalBeginRead (Mono.Security.Protocol.Tls.InternalAsyncResult asyncResult) [0x00000] in :0
--- End of inner exception stack trace ---
at Mono.Security.Protocol.Tls.SslStreamBase.InternalBeginRead (Mono.Security.Protocol.Tls.InternalAsyncResult asyncResult) [0x00000] in :0
at Mono.Security.Protocol.Tls.SslStreamBase.BeginRead (System.Byte[] buffer, Int32 offset, Int32 count, System.AsyncCallback callback, System.Object state) [0x00000] in :0
at System.Net.Security.SslStream.BeginRead (System.Byte[] buffer, Int32 offset, Int32 count, System.AsyncCallback asyncCallback, System.Object asyncState) [0x00000] in :0
at SuperSocket.SocketEngine.AsyncStreamSocketSession.OnStreamEndRead (IAsyncResult result) [0x00000] in :0

SuperWebSockets issue on Chrome connecting with SSL

I am having a problem with Chrome and Firefox with immediate disconnect. IE does not have a problem.

Chrome and FireFox drop connection right after they attempt to connect

IE works fine but it is the browser that Dev Environment is using.

My project uses SuperWebSockets in a Windows C# .NET 4.5.2 platform. It includes MS Owin Security Membership for authentication. Chrome works when unauthenticated.

I am using SSL in VS 2015 Dev environment based on the info from Hanselman’s page:
https://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx

The localhost.pfx is in both in Personal and Trusted Root.

IE has no problems,

Chrome is working with SSL when it comes to navigating the site pages but not chat. On pages, it does display ‘Not Secure’ in upper left before location address and the ‘https’ has a line through it. When I navigate to chat with Chrome, I get the Status Code 1006

Firefox wouldn’t load the site because I am using a self signed cert until I created an exception.
However, when I tried the websocket chat, there error Firefox produced is:

“Firefox can’t establish a connection to the server at wss://localhost:8080/”, again with Status Code 1006.

When I added this address as security exception, The results of Firefox matched Chrome.

I have my server running as a console application. I am using config to load the SuperWebSocket AppServer. This is my server info:

`var config = new RootConfig();
var serverConfig = new ServerConfig
{
Name = "SecureSuperWebSocket",
Ip = "Any",
Port = 8080,
Mode = SocketMode.Tcp,
Security = "tls",
Certificate = new SuperSocket.SocketBase.Config.CertificateConfig
{
FilePath = @"C:\cert\localhost.pfx",
Password = "password",
}
};

var config = new RootConfig();
var serverConfig = new ServerConfig
{
Name = "SecureSuperWebSocket",
Ip = "Any",
Port = 8080,
Mode = SocketMode.Tcp,
Security = "tls",
Certificate = new SuperSocket.SocketBase.Config.CertificateConfig
{
FilePath = @"C:\cert\localhost.pfx",
Password = "password",
}
};
`

Listed Below you will find header Request & Response:

Request Header:
GET wss://localhost:8080/ HTTP/1.1
Host: localhost:8080
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket
Origin: https://localhost
Sec-WebSocket-Version: 13
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.8
Cookie: ASP.NET_SessionId=emcrnvstlf1qzminwio3fdjh; __RequestVerificationToken=9W-RF42eLvqBKlmWhVjiwO-fKaOjd95wN9zbqkqsREZjp4NYYqNKxVsOaEbZoH5--x4LbFox-KR8XrKeax4kZipObDetBTK41icSAyHxbyc1; .AspNet.ApplicationCookie=NWIjgt4GDVC9zZE5g4BD1EItF28631kgz0-3yHucVKJzcw1rH5wLaNVJj02U0pewtkZ3pQ-DYzai54daLZxEzNWhg_HfAiNI-4SYqX7V0Tzafedt5gDwjt7hLWbYvMaS6uQFYqfM-lSJ_q6j27v8K-mg6MEdZkiGDehnOjIE5TCB8y1LA12zoTSESluMRFsA2JzMJr8ylNr0XKwSYmOh2DlRa5h7_MAB5PBMdgCeLBbvS9sQtFrUgTFdckm5efg9m_iy11_bbegq4BVllyD3_vUfqhUpleRhm1vOaCnIiM0U-CnEDZVqE1tYAyQRwhB03tlBfitJTW7k8KOAJcfiBlg_kXsxz49dmRH1Jf0qgb99RB0hJ_x5i4YF8w3SIZUNXF4rc5AfOcKSpu1LLacs0Tx47-CEQeBxK4YyAYASuWbnGKxFiwBFPdW5yXALc_Hakrg5f2PgDtisko8d7oavGF_ZTrrSFDGMYSRpRtn464pG7n38YfRliAhqRgb8zgNF
Sec-WebSocket-Key: XtMCuOCoCpxYJwRBZyuW0g==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits

Response Header:
HTTP/1.1 101 Switching Protocols
Upgrade: WebSocket
Connection: Upgrade
Sec-WebSocket-Accept: w154TBvSuhc7EQv0LO243p3v2JI=

Debugging SuperWebSocket as far as I can, here are the following areas that returns error:

File: WebSocketProtocol.cs
public IReceiveFilter CreateFilter(IAppServer appServer, IAppSession appSession, System.Net.IPEndPoint remoteEndPoint)
{
return new WebSocketHeaderReceiveFilter((IWebSocketSession)appSession);
}

File: WebSocketReceiveHeaderFilter.cs
public WebSocketHeaderReceiveFilter(IWebSocketSession session)
: base(session)
{
m_SearchState = new SearchMarkState(m_HeaderTerminator);
}

Any ideas what I need to do to get Firefox and Chrome working in test environment?

tls 1.2 issue (browser side times out)

I am using the tls12 in the configuration and the supersocket server starts fine and performance collector is showing fine too.
The browser connects fine when I am using just "tls" in the security.

When I am connecting to the browser with server running in "tls12" mode, the server shows that the connection has opened and the collector also shows the connection.

2018-11-09 11:43:47,365 [7] INFO SecureSuperWebSocket - Session: 879cc16b-32cf-4b5c-83e8-18798e46ae36/127.0.0.1:58335
A new session connected!
2018-11-09 11:43:48,591 [6] INFO Performance - ---------------------------------------------------
CPU Usage: 1.93%, Physical Memory Usage: 45,481,984.00, Total Thread Count: 21
AvailableWorkingThreads: 32766, AvailableCompletionPortThreads: 1000
MaxWorkingThreads: 32767, MaxCompletionPortThreads: 1000
SecureSuperWebSocket ----------------------------------
Started Time: 11/9/2018 11:42:19 AM
Is Running: True
Total Connections: 1
Maximum Allowed Connection Number: 100
Total Handled Requests: 0
Request Handling Speed (#/second): 0
Avialable Sending Queue Items: 255
Total Sending Queue Items: 256

But on the browser side, in few sec the connection errors out
WebSocket connection to 'wss://server' failed: WebSocket opening handshake timed out

System.UriFormatException: 无效的 URI: 字符串中有无效的序列

Failed to read cookie, key: key_name, value: v=2&v_id=3383628&v_name=%89%5b%b0e%0f%5c%03N.
System.UriFormatException: 无效的 URI: 字符串中有无效的序列。
   在 System.Uri.UnescapeString(Char* pStr, Int32 start, Int32 end, Char[] dest, Int32& destPosition, Char rsvd1, Char rsvd2, Char rsvd3, UnescapeMode unescapeMode, UriParser syntax, Boolean isQuery, Boolean readOnlyConfig)
   在 System.Uri.UnescapeDataString(String stringToUnescape)
   在 SuperWebSocket.WebSocketSession`1.SetCookie() 位置 f:\Work\Websockets\SuperWebSocket-master\SuperWebSocket\WebSocketSession.cs:行号 353

测试了下 "%89%5b%b0e%0f%5c%03N" 这个串Uri.UnescapeDataString()必然出错,
因为这个 Cookie 是多个子Cookie拼合而成的, 示范代码;

curCookie = current.Request.Cookies["key_name"];
curCookie["v_id"] = 1111;
curCookie["v_name"] = HttpUtility.UrlEncode("这里是中文", Encoding.Unicode);
current.Response.Cookies.Add(curCookie);

ios Invalid http upgrade

anroid is ok;
browser is ok;
ios is can't connect Invalid http upgrade, and i find Session Close can capture.

Websocket server crashes on mono on CentOS

Hello, sorry to bother you, but I recently ran a small web socket sample server using the provided SuperWebSocket library and tested the sample by using a Websocket4net client program to open 1000 connections to my server (running on a CentOS VM with the help of mono).

What test did I do?
The client program tries to open about 1000 connections to the server but will finish running first, and by then the connections will be abruptly closed to test if the server could survive such a scenario. Unfortunately, the server program crashed and below is my output.
Is this an issue of the SuperWebSocket library or a mono problem? Thanks.

Here is my output log from my VM
....
[OnClose] 192.168.1.150:63282 closed. Total 2
[OnClose] Total stored : 2
[OnClose] 192.168.1.150:63283 closed. Total 1
[OnClose] Total stored : 1
[ERROR] FATAL UNHANDLED EXCEPTION: System.Net.Sockets.SocketException (0x80004005): The socket is not connected
at System.Net.Sockets.Socket.get_RemoteEndPoint () [0x00036] in /builddir/build/BUILD/mono-5.4.1.7/mcs/class/System/System.Net.Sockets/Socket.cs:368
at SuperSocket.SocketEngine.SocketSession..ctor (System.Net.Sockets.Socket client) [0x0004a] in :0
at SuperSocket.SocketEngine.AsyncSocketSession..ctor (System.Net.Sockets.Socket client, SuperSocket.SocketEngine.AsyncSocket.SocketAsyncEventArgsProxy socketAsyncProxy, System.Boolean isReset) [0x00000] in :0
at SuperSocket.SocketEngine.AsyncSocketSession..ctor (System.Net.Sockets.Socket client, SuperSocket.SocketEngine.AsyncSocket.SocketAsyncEventArgsProxy socketAsyncProxy) [0x00000] in :0
at SuperSocket.SocketEngine.AsyncSocketServer.ProcessNewClient (System.Net.Sockets.Socket client, System.Security.Authentication.SslProtocols security) [0x0008f] in :0
at SuperSocket.SocketEngine.AsyncSocketServer.OnNewClientAccepted (SuperSocket.SocketEngine.ISocketListener listener, System.Net.Sockets.Socket client, System.Object state) [0x0001d] in :0
at SuperSocket.SocketEngine.SocketListenerBase.OnNewClientAccepted (System.Net.Sockets.Socket socket, System.Object state) [0x00010] in :0
at SuperSocket.SocketEngine.TcpAsyncSocketListener.ProcessAccept (System.Net.Sockets.SocketAsyncEventArgs e) [0x0009d] in :0
at SuperSocket.SocketEngine.TcpAsyncSocketListener.acceptEventArg_Completed (System.Object sender, System.Net.Sockets.SocketAsyncEventArgs e) [0x00001] in :0
at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted (System.Net.Sockets.SocketAsyncEventArgs e) [0x0000e] in /builddir/build/BUILD/mono-5.4.1.7/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs:210
at System.Net.Sockets.SocketAsyncEventArgs.Complete () [0x00000] in /builddir/build/BUILD/mono-5.4.1.7/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs:200
at System.Net.Sockets.Socket+<>c.<.cctor>b__307_0 (System.IAsyncResult ares) [0x00092] in /builddir/build/BUILD/mono-5.4.1.7/mcs/class/System/System.Net.Sockets/Socket.cs:606
at System.Net.Sockets.SocketAsyncResult+<>c.b__27_0 (System.Object state) [0x00000] in /builddir/build/BUILD/mono-5.4.1.7/mcs/class/System/System.Net.Sockets/SocketAsyncResult.cs:157
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00015] in /builddir/build/BUILD/mono-5.4.1.7/mcs/class/referencesource/mscorlib/system/threading/threadpool.cs:1279
at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in /builddir/build/BUILD/mono-5.4.1.7/mcs/class/referencesource/mscorlib/system/threading/threadpool.cs:856
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in /builddir/build/BUILD/mono-5.4.1.7/mcs/class/referencesource/mscorlib/system/threading/threadpool.cs:1211

session.Connected sometimes false

问题
后端foreach(var session in tvSession.AppServer.GetAllSessions())的session.Connected有时候是false,此时session.send(xxx)发送消息失败

本地环境

  • SuperSocket 1.6.6.1
  • SuperSocket.Engine 1.6.6.1
  • SuperSocket.WebSocket 1.6.6.1

后端
使用了自定义WebSocketSession
在类 xxx : SubCommandBase中
foreach(var session in tvSession.AppServer.GetAllSessions())

前端
在ws.onopen的时候ws.send,获取相应数据,此时的ws.readyState=1,理论上应该是没问题的

尝试
尝试过在onopen之后延迟send
以及在onopen之外通过setTimeout+判断readyState==1之后再send的方式
发现使用xx:SubCommandBase的方式会出现这个问题
后端直接使用ws.NewMessageReceived的方式,前端延迟send就可以解决问题,但是太不优雅,如你所说,不符合OOD原则

SuperSocket.Common.ArraySegmentList System.IndexOutOfRangeException: 索引超出了数组界限

System.IndexOutOfRangeException: 索引超出了数组界限。
   在 SuperSocket.Common.ArraySegmentList`1.get_Item(Int32 index) 位置 \SuperSocket-master\Common\ArraySegmentList.cs:行号 103
   在 SuperWebSocket.Protocol.WebSocketDataFrame.get_Key() 位置 \SuperWebSocket-master\SuperWebSocket\Protocol\WebSocketDataFrame.cs:行号 115
   在 SuperSocket.SocketBase.AppServerBase`2.ExecuteCommand(TAppSession session, TRequestInfo requestInfo) 位置 \SuperSocket-master\SocketBase\AppServerBase.cs:行号 1212
   在 SuperWebSocket.WebSocketServer`1.ExecuteCommand(TWebSocketSession session, IWebSocketFragment requestInfo) 位置 \SuperWebSocket-master\SuperWebSocket\WebSocketServer.cs:行号 686
   在 SuperSocket.SocketBase.AppSession`2.SuperSocket.SocketBase.IAppSession.ProcessRequest(Byte[] readBuffer, Int32 offset, Int32 length, Boolean toBeCopied) 位置 \SuperSocket-master\SocketBase\AppSession.cs:行号 568

Message not received right after connecting

Right after my client connects to the server, it sends a message.

Most of the time server doesn't handle this message. My guess is that session is created a bit too late
(I checked, and WebSocketServer.NewSessionConnected is sometimes invoked later than client sends the message)

Anyone had similar problems? How did you work around them?

Sending a second message from client to server fails

Using the latest source from Github for SuperSockets, SuperWebSockets, WebSocket4Net and SuperSocket.ClientEngine I can open a connection from a Client to a server (WebSockets) and send as many message from the server to the client that I want. However whenever I try to send more than one message from the client to the server connection is closed.

I have track this down to a change you made in "SuperSocket/SocketBase/AppSession.cs".

You added the line "var currentRequestLength = m_ReceiveFilter.LeftBufferSize" to the "FilterRequest" method (line 504 in the latest version on github). When this method is called for the second message sent from the client m_frame used in the property get method, LeftBufferSize, is null and causes a null reference exception to occur. Note, the first time it is not null.

I was able to work around this by checking for null in the LeftBufferSize property get method. I don't think this is a good solution since I think what you are trying to handle large data frames being sent from a client and my "kludge" won't do that.

压力测试时报 Unexpected socket error: 10054

同时1千并发连接开始都是正常的,后面四五百个连接失败提示 Unexpected socket error: 10054,远程主机强迫关闭了一个现有的连接,抓包发现服务器ack超时,而且都是客户端重连syn后才返回原先syn的ack
qq 20171225163824

Switching to binary mode

When I open a SuperWebSocket client connection how do I switch from text to binary mode. With .Net WebSockets all I have to do is...

WebSocket.Options.SetRequestHeader("MessageType", "binary");

How do I do this with SuperWebSockets?

Note: The WebSocket server application I am talking to is not based on SuperWebSockets. It is located in another device and uses a version of the Mongoose WebSocket server.

WebSocketServer.cs:行号 640 System.IndexOutOfRangeException: 索引超出了数组界限

System.IndexOutOfRangeException: 索引超出了数组界限。
   在 SuperWebSocket.WebSocketServer`1.ParseHandshake(IWebSocketSession session, TextReader reader) 位置 \SuperWebSocket-master\SuperWebSocket\WebSocketServer.cs:行号 640
   在 SuperWebSocket.Protocol.WebSocketHeaderReceiveFilter.Filter(Byte[] readBuffer, Int32 offset, Int32 length, Boolean isReusableBuffer, Int32& rest) 位置 \SuperWebSocket-master\SuperWebSocket\Protocol\WebSocketHeaderReceiveFilter.cs:行号 63

Line640

ProtocolError when receiving long message

Hello, when I try to send long message to the supersocketwebsocket server it disconnects user with this message: ProtocolError

Message I send to server is:

connection.send(JSON.stringify({"type":"TEST","data":{"toSocket":"fasfffffffLorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque eu molestie tortor, non lobortis sem. In pulvinar facilisis purus quis pretium. Proin vulputate, nibh quis porttitor mollis, arcu risus molestie augue, sed mollis sem justo tempus lorem. Praesent et mauris tempor, mattis urna pulvinar, ornare neque. Aenean convallis tortor nibh, sed vehicula nibh dictum eget. In vulputate sed dolor a condimentum. Fusce imperdiet sodales consectetur. Pellentesque eleifend elit et lacinia rhoncus. Aenean quis nisi faucibus, cursus enim in, dapibus augue.Sed massa leo, fringilla sit amet felis a, pellentesque vehicula ipsum. In vulputate tempus arcu, eget efficitur turpis vehicula id. Quisque placerat dui quis massa sodales, eget interdum elit ornare. Pellentesque suscipit ac augue sed mollis. Morbi enim ipsum, feugiat sed nulla eu, suscipit fringilla nulla. Maecenas sed orci sed odio consequat venenatis sit amet id justo. Donec dignissim ex quis quam suscipit ultricies. Maecenas gravida eu velit vitae interdum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.uisque eget gravida nunc. Nam molestie lorem non magna egestas, ac rhoncus massa rhoncus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse potenti. Sed eleifend sagittis enim malesuada auctor. Nunc bibendum cursus dolor sit amet elementum. Morbi molestie ante tellus, at vehicula felis viverra et. Quisque in libero dui. Mauris ut est ac libero feugiat auctor. Integer fermentum nunc nec diam sagittis, vitae sodales dui mattis. Suspendisse potenti. Phasellus vel auctor erat, in porta mauris. Ut sed leo efficitur, molestie nisl eu, rhoncus diam. Pellentesque interdum eros a lacus ornare iaculis. Sed luctus tellus sagittis blandit lacinia.ffffffff"}}));

The reason why I need to send long messages is because WebRTC icecandidates are about that lenght. This creates some issues for me as I use supersocketwebsocket as a signalling server.

On another C# websocket implementation I was able to disable Websocket per message diflate option. Which fixed this issue. But I dont use that implementation anymore

WebSocketServer的SessionClosed触发后,并没有与客户端进行断开

调用方式为直接添加的事件回调
SessionClosed += OnWSDisconnect;

日志输出如下:
2016-02-26 18:11:17,292 [6188] DEBUG System.Object - PushWebSocketServer_-OnWSDisconnect-WebSocketSession:10.96.16.236:4715-CloseReason:SocketError

但是客户端的socket并没有触发断开, 还可以正常发送ping和接收pong

目前使用的SuperSocket类库为 1.6.6.0

麻烦帮忙看下,谢谢。

Unity 4.0 support?

Hi,

I have problems trying to add websockets support in the upcoming Unity 4.0 environment, which has an integrated Mono 2.6 environment.

Is there a reason why your software cannot work in Unity 4.0? Or maybe I should insist?

Thanks!

Conflict NewMessageReceived event

After multiple clients send different messages at the same time, all events fire, but all messages are the same as the last client's message that arrived. It appears as if the last client's message creates a conflict and destroys the previous messages.

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Dim MyWebSocket As WebSocketServer = New WebSocketServer()
    MyWebSocket.Setup(prot)
    MyWebSocket.Start()

    AddHandler MyWebSocket.NewMessageReceived, AddressOf MyWebSocket_NewMessageReceived
End Sub

event:

Private Sub MyWebSocket_NewMessageReceived(session As WebSocketSession, value As String)
    Invoke(Sub()
               ListBox1.Items.Add(value)
           End Sub)
End Sub

If two clients send a message at the same time, for example:
Client1.Send("Data1")
Client2.Send("Data2")
then ListBox1.Items are Data2, Data2.

What's the solution?

Configuration exception: unknown attribute 'xmlns'.

Hi!

I have following config file:

<?xml version="1.0"?><configuration>
  <configSections>
    <section name="superSocket" type="SuperSocket.SocketEngine.Configuration.SocketServiceConfig, SuperSocket.SocketEngine" />
  </configSections>
  <superSocket
               xmlns = "http://schema.supersocket.net/supersocket"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://schema.supersocket.net/supersocket  http://schema.supersocket.net/v1-7/supersocket.xsd"

               logFactory="ConsoleLogFactory"

               disablePerformanceDataCollector="true"
               maxWorkingThreads="500"
               maxCompletionPortThreads="500"
               minWorkingThreads="5"
               minCompletionPortThreads="5">
    <servers>
      <server name="SuperWebSocket"
              serverTypeName="SuperWebSocket"
              ip="Any"
              port="2012"
              clearIdleSession="true"
              clearIdleSessionInterval="1"
              idleSessionTimeOut="5"
              maxConnectionNumber="100"
              >

        <subProtocols>
          <protocol>
            <commands>
              <add assembly="SuperWebSocket.Samples.CommandAssembly"/>
              <!--
              you can add more command assemblies
              <add assembly="SuperWebSocket.Samples.CommandAssembly2"/>
              <add assembly="SuperWebSocket.Samples.CommandAssembly3"/>
              -->
            </commands>
          </protocol>
        </subProtocols>


      </server>
    </servers>

    <serverTypes>
      <add name="SuperWebSocket"
           type="SuperWebSocket.WebSocketServer, SuperWebSocket" />
    </serverTypes>  

    <logFactories>
      <add name="ConsoleLogFactory"
           type="SuperSocket.SocketBase.Logging.ConsoleLogFactory, SuperSocket.SocketBase" />
    </logFactories>
  </superSocket>
</configuration>

and when using BootstrapFactory.CreateBootstrapFromConfigFile("test.config") it throws. When I remove xmlns lines ( xmlns, xmlns:xsi, xsi:schemaLocation) everything works fine.

What I'm doing wrong?
I use version 0.8 from Nuget.

Thanks in advance!

Allow handling of non-websocket HTTP calls.

It would be nice to have some sort of "Fallback-ProtocolProcessor" to handle any HTTP calls that might have come from the user. From what I could see is this would perfectly fit into the WebSocketProtocolProcessor chain. All WebSocket protocol processors will fail on a normal HTTP call. In this case the "Fallback-ProtocolProcessor" could kick-in and handle the normal HTTP call by loading and returning some data.

Our plan is to add a simple REST API in parallel to the WebSocket connection which allows us querying some status information of the server (e.g. connected clients, data throughput etc.).

Sadly the protocol-processor chain is set-up hidden in the WebSocketServer.Setup method. I cannot see an easy way of adding a custom ProtocolProcessor to this chain.

Connection established but GetAllSessions finds nothing until a little time has passed.

Note that I am Starting By Config (if that matters).

I have been building my app, and I noticed that after a client connects to the server, and then sends a message immediately after, the ExecuteJsonCommand fires, however, GetAllSessions/GetSessions produced zero results until a small period of time has elapsed (less than 2 seconds).

From the samples, I added the following code, and it too revealed zero connections after a connection was established..

void webSocketNewSessionConnected (WebSocketSession session) { int x = 0; foreach (var s in GetAllSessions()) { x++; } Console.WriteLine ("foreach count: {0} SessionCount: {1}", x, SessionCount); //outputs: foreach count: 0 SessionCount: 1 }

I hope I'm missing something because that is a big issue for me.

System.TimeoutException: The sending attempt timed out

System.TimeoutException: The sending attempt timed out
在 SuperSocket.SocketBase.AppSession2.InternalSend(ArraySegment1 segment)
在 SuperSocket.SocketBase.AppSession2.Send(Byte[] data, Int32 offset, Int32 length) 在 SuperSocket.WebSocket.WebSocketSession1.SuperSocket.WebSocket.IWebSocketSession.SendRawData(Byte[] data, Int32 offset, Int32 length)
在 SuperSocket.WebSocket.Protocol.DraftHybi10Processor.SendPackage(IWebSocketSession session, Int32 opCode, Byte[] data, Int32 offset, Int32 length)
在 SuperSocket.WebSocket.Protocol.DraftHybi10Processor.SendMessage(IWebSocketSession session, Int32 opCode, String message)
在 SuperSocket.WebSocket.Protocol.DraftHybi10Processor.SendMessage(IWebSocketSession session, String message)

I am keeping get this error via in my server when I tried to boardcast the message to all the users in my project, did anyone has some solutions for this ? thanks

Nuget package

There are two SuperWebSocket packages on NuGet (1, 2), both of which are out of date. It looks like you weren't the one who put them there. You should probably take ownership of this one and maintain it yourself so that it stays up to date.

Failed to parse handshake!

I am getting this error logged in SuperWebSocket err log file, when client connects to the server developed using SuperWebSocket. But it seems the upgrade request send by client during websocket handshake is fine.

I added some trace logs in SuperWebSocket and it seems GET and HTTP/1.1 is coming in two different lines during the ReadLine call on StringReader , resulting in ParseHandshake throwing exception.

But when same header is printed by Logger, upgrade request seems to be fine.

GET / HTTP/1.1
Pragma: no-cache
Cache-Control: no-cache
Host: accesscomeserver.qa.mymaxprocloud.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: RMK4qLOdY/JVzCP1CDbaJg==
Origin: http://accesscomeserver.qa.mymaxprocloud.com
Sec-WebSocket-Protocol: honeywell.isom.http
Sec-WebSocket-Extensions:
Sec-WebSocket-Version: 13
X-HON-ISOM-Authorization: Basic MDA0MDg0MjE2MzkwOjAwNDA4NDIxNjM5MA==
Authorization: Basic MDA0MDg0MjE2MzkwOmJDV040V2dPYkFTcXUydTI=

Building with Mono

On the main project site it's said that the project fully supports Mono. But there are no any instructions on building the project with Mono. There are also no Mono sln file in the repository.

Would you add a simple instruction on building with Mono in README file?

Compression

Does SuperWebSocket support any extensions for compression?

SuperWebSocket is not work for chrome 22

I just check today(5/10/2012) and superwebsocket is not work for secure socket with certificate.But Opera is work .Can you tell me how to fix it ?. The socket is automatic closed .Not open conection.

support for Sec-WebSocket-Extensions

Does latest superwebsocket has support for Sec-WebSocket-Extensions? i wanted to compress binary data from server to client (chrome browser) and came to know that it can be done via Sec-WebSocket-Extensions. wondering whether this library has that support or not?

session发送消息失败

getallsessions获取的session发送消息有时候会出现未对对象设置引用到实例,不支持websocket的时候,并且第二次刷新页面的时候会出现。

Binding to port 0

When you bind to port 0, the system assigns you some unspecified available port. This is only useful if you can get that port back from SuperWebSocket, but it does not seem to expose the endpoint of the listener.

Could not load file or assembly 'SuperSocket.SocketEngine' or one of its dependencies. The system cannot find the file specified.

I used this NuGet package, which seems to be the most recent. The package doesn't contain SuperSocket.SocketEngine.

Here's the stack trace:

at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
   at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Boolean throwOnError)
   at SuperSocket.SocketBase.AppServerBase`2.SetupBasic(IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory)
   at SuperSocket.SocketBase.AppServerBase`2.Setup(IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory, IReceiveFilterFactory`1 receiveFilterFactory, ILogFactory logFactory, IEnumerable`1 connectionFilters, IEnumerable`1 commandLoaders)
   at SuperSocket.SocketBase.AppServerBase`2.Setup(IServerConfig config, ISocketServerFactory socketServerFactory, IReceiveFilterFactory`1 receiveFilterFactory, ILogFactory logFactory, IEnumerable`1 connectionFilters, IEnumerable`1 commandLoaders)

And the fusion log from the exception, if it helps:

=== Pre-bind state information ===
LOG: DisplayName = SuperSocket.SocketEngine
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: SuperSocket.SocketEngine | Domain ID: 1
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///[redacted]/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : SuperSocket.SocketBase, Version=1.6.5.0, Culture=neutral, PublicKeyToken=6c80000676988ebb.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: [redacted]\bin\Debug\MyApp.vshost.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///[redacted]/bin/Debug/SuperSocket.SocketEngine.DLL.
LOG: Attempting download of new URL file:///[redacted]/bin/Debug/SuperSocket.SocketEngine/SuperSocket.SocketEngine.DLL.
LOG: Attempting download of new URL file:///[redacted]/bin/Debug/SuperSocket.SocketEngine.EXE.
LOG: Attempting download of new URL file:///[redacted]/bin/Debug/SuperSocket.SocketEngine/SuperSocket.SocketEngine.EXE.

Apparently SuperSocket.SocketBase needs SuperSocket.SocketEngine (although there's no explicit reference), but SuperSocket.SocketEngine has a reference to SuperSocket.SocketBase... How is this all supposed to work?

Anyway, adding the SuperSocket.Engine package solves the problem. I think the SuperSocket.WebSocket package should have a dependency on SuperSocket.Engine, not SuperSocket

Seeing 'invalid frame header' and 'could not decode a text frame as UTF8' errors in chrome when connected to SuperWebSockets

Hello,
I'm seeing these errors in Chrome when connected to a SuperWebSockets server:

WebSocket connection to 'ws://10.10.81.15:10081/' failed: Invalid frame header
WebSocket connection to 'ws://10.10.81.15:10081/' failed: Could not decode a text frame as UTF-8.

Do you know what can cause this? In my server, I'm using the default (text mode) connection and passing strings to the connection.

当 Origin 不是 localhost 时,返回 ProtocolError

when i want to make a plug in for chrome , i used supper websocket as the server to save data that posted from chrome.

but when the plug in was running on some website like 'www.baidu.com', i got ProtocolError in supper websocket.

i tracked to 'base.OnNewSessionConnected((TWebSocketSession)appSession);', is there some thing happend in SockedBase ?

please help me, please.

Ping Ping

Hi , I have a simple echo server deploy on Azure VM. When the client is idle after some time, the messages will not be sent/received. The client is still connected, there is no timeout. This does not happen on my local test.

I suspect Azure is killing idle connection, I have change ping pong time to a few secounds but it still does not work. Is there a way to log the Ping Pong, my logs couldn't see it.

My server setup

SuperWebsocketServer.Setup (new RootConfig (),
                             new ServerConfig
                             {
                                Name                      = "TestSuperWebSocket",
                               Ip                        = "Any",
                               KeepAliveInterval         = 4,
                               KeepAliveTime             = 3,
                               LogBasicSessionActivity   = true,
                               LogCommand                = true,
                               Port                      = Port,
                               MaxConnectionNumber       = 65000
                               }

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in SuperWebSocket.dll


using SuperSocket.SocketBase;
using SuperWebSocket;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WebSocketServer2
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Press any key to start the WebSocketServer!");

            Console.ReadKey();
            Console.WriteLine();

            var appServer = new WebSocketServer();

            //Setup the appServer
            if (!appServer.Setup(2012)) //Setup with listening port
            {
                Console.WriteLine("Failed to setup!");
                Console.ReadKey();
                return;
            }

            appServer.NewMessageReceived += new SessionHandler(appServer_NewMessageReceived);

            Console.WriteLine();

            //Try to start the appServer
            if (!appServer.Start())
            {
                Console.WriteLine("Failed to start!");
                Console.ReadKey();
                return;
            }

            Console.WriteLine("The server started successfully, press key 'q' to stop it!");

            while (Console.ReadKey().KeyChar != 'q')
            {
                Console.WriteLine();
                continue;
            }

            //Stop the appServer
            appServer.Stop();

            Console.WriteLine();
            Console.WriteLine("The server was stopped!");
            Console.ReadKey();

        }


        static void appServer_NewMessageReceived(WebSocketSession session, string message)
        {
            //Send the received message back
            session.Send("Server: " + message);
        }

    }
}

When I project run then throwing FileNotFoundException
ScreenShot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.