WebSockets is good, because only one connection is opened between client and server.
This is like TCP sockets + handshake is supporting there.
No need to send many XHR queries,
and open many connections to get response for this queries, before close this connections after receive response.
You can see this all in your firewall, or sniffer.
Browsers can not working with sockets, but this can working with websockets.
Clients, can working with websockets, using JavaScript.
But... To working with this websockets, need to run WebSocket-server.
Fleck2 - this is a small websocket server, writted on C#.
This can be compiled on Windows and runned there.
This branch can return, after compilation, the Fleck2.dll for different version .NET Framework,
and the demo - working without dlls.
To see demo-chat on websockets, just ownload this branch as zip-archive,
and run \build.bat, or \demo\Compile.bat (to don't compile dll-files).
After this, you can see compiles demo-server in the folder demo\bin\Release\.
Then run start_Fleck2_demo.bat wait for opening client.html in your browser,
and begin the chat with server using websocket.
All your writted messages in the client.html - will be delivered in the server console,
and websocket-server will return the echo response.
The source code from this branch was been sucessfully compiled
and runned on Windows XP with .NET Framework 4.0.
Bugs are fixed. See source the code.
WebSockets
is good, becauseonly one connection
is opened betweenclient
andserver
. This is like TCP sockets + handshake is supporting there. No need to send many XHR queries, and open many connections to get response for this queries, before close this connections after receive response. You can see this all in your firewall, or sniffer.Browsers can not working with sockets, but this can working with websockets.
Clients
, can working withwebsockets
, using JavaScript. But... To working with thiswebsockets
, need to runWebSocket-server
.Fleck2
- this is a smallwebsocket server
, writted onC#
. This can be compiled onWindows
and runned there. This branch can return, after compilation, theFleck2.dll
for different version .NET Framework, and thedemo
- workingwithout dlls
.To see
demo-chat
on websockets, just ownload this branch aszip
-archive, and run\build.bat
, or\demo\Compile.bat
(to don't compiledll-files
). After this, you can see compilesdemo-server
in the folderdemo\bin\Release\
. Then runstart_Fleck2_demo.bat
wait for openingclient.html
in your browser, and begin the chat with server usingwebsocket
. All your writted messages in theclient.html
- will be delivered in the server console, and websocket-server will return theecho response
.The source code from
this branch
was been sucessfully compiled and runned on Windows XP with .NET Framework 4.0. Bugs are fixed. See source the code.Have a nice day.