Git Product home page Git Product logo

socket.io's Introduction

socket.io

Run on Repl.it Backers on Open Collective Sponsors on Open Collective Build Status NPM version Downloads

Features

Socket.IO enables real-time bidirectional event-based communication. It consists of:

Some implementations in other languages are also available:

Its main features are:

Reliability

Connections are established even in the presence of:

  • proxies and load balancers.
  • personal firewall and antivirus software.

For this purpose, it relies on Engine.IO, which first establishes a long-polling connection, then tries to upgrade to better transports that are "tested" on the side, like WebSocket. Please see the Goals section for more information.

Auto-reconnection support

Unless instructed otherwise a disconnected client will try to reconnect forever, until the server is available again. Please see the available reconnection options here.

Disconnection detection

A heartbeat mechanism is implemented at the Engine.IO level, allowing both the server and the client to know when the other one is not responding anymore.

That functionality is achieved with timers set on both the server and the client, with timeout values (the pingInterval and pingTimeout parameters) shared during the connection handshake. Those timers require any subsequent client calls to be directed to the same server, hence the sticky-session requirement when using multiples nodes.

Binary support

Any serializable data structures can be emitted, including:

Simple and convenient API

Sample code:

io.on('connection', socket => {
  socket.emit('request', /* … */); // emit an event to the socket
  io.emit('broadcast', /* … */); // emit an event to all connected sockets
  socket.on('reply', () => { /* … */ }); // listen to the event
});

Cross-browser

Browser support is tested in Sauce Labs:

Sauce Test Status

Multiplexing support

In order to create separation of concerns within your application (for example per module, or based on permissions), Socket.IO allows you to create several Namespaces, which will act as separate communication channels but will share the same underlying connection.

Room support

Within each Namespace, you can define arbitrary channels, called Rooms, that sockets can join and leave. You can then broadcast to any given room, reaching every socket that has joined it.

This is a useful feature to send notifications to a group of users, or to a given user connected on several devices for example.

Note: Socket.IO is not a WebSocket implementation. Although Socket.IO indeed uses WebSocket as a transport when possible, it adds some metadata to each packet: the packet type, the namespace and the ack id when a message acknowledgement is needed. That is why a WebSocket client will not be able to successfully connect to a Socket.IO server, and a Socket.IO client will not be able to connect to a WebSocket server (like ws://echo.websocket.org) either. Please see the protocol specification here.

Installation

// with npm
npm install socket.io

// with yarn
yarn add socket.io

How to use

The following example attaches socket.io to a plain Node.JS HTTP server listening on port 3000.

const server = require('http').createServer();
const io = require('socket.io')(server);
io.on('connection', client => {
  client.on('event', data => { /* … */ });
  client.on('disconnect', () => { /* … */ });
});
server.listen(3000);

Standalone

const io = require('socket.io')();
io.on('connection', client => { ... });
io.listen(3000);

Module syntax

import { Server } from "socket.io";
const io = new Server(server);
io.listen(3000);

In conjunction with Express

Starting with 3.0, express applications have become request handler functions that you pass to http or http Server instances. You need to pass the Server to socket.io, not the express application function. Also make sure to call .listen on the server, not the app.

const app = require('express')();
const server = require('http').createServer(app);
const io = require('socket.io')(server);
io.on('connection', () => { /* … */ });
server.listen(3000);

In conjunction with Koa

Like Express.JS, Koa works by exposing an application as a request handler function, but only by calling the callback method.

const app = require('koa')();
const server = require('http').createServer(app.callback());
const io = require('socket.io')(server);
io.on('connection', () => { /* … */ });
server.listen(3000);

In conjunction with Fastify

To integrate Socket.io in your Fastify application you just need to register fastify-socket.io plugin. It will create a decorator called io.

const app = require('fastify')();
app.register(require('fastify-socket.io'));
app.io.on('connection', () => { /* … */ });
app.listen(3000);

Documentation

Please see the documentation here.

The source code of the website can be found here. Contributions are welcome!

Debug / logging

Socket.IO is powered by debug. In order to see all the debug output, run your app with the environment variable DEBUG including the desired scope.

To see the output from all of Socket.IO's debugging scopes you can use:

DEBUG=socket.io* node myapp

Testing

npm test

This runs the gulp task test. By default the test will be run with the source code in lib directory.

Set the environmental variable TEST_VERSION to compat to test the transpiled es5-compat version of the code.

The gulp task test will always transpile the source code into es5 and export to dist first before running the test.

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

License

MIT

socket.io's People

Contributors

3rd-eden avatar ad7six avatar akamensky avatar asyncanup avatar bananaappletw avatar darrachequesne avatar defunctzombie avatar digawp avatar doozr avatar dshaw avatar dvv avatar einaros avatar gavinuhma avatar grant avatar kevin-roark avatar leodog896 avatar martinthomson avatar matthewmueller avatar mattrobenolt avatar maximekjaer avatar nkzawa avatar paradite avatar rase- avatar rauchg avatar tj avatar tripu avatar tw0517tw avatar xaroth8088 avatar zachhaber avatar zweihan 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  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

socket.io's Issues

DOS Attack

If try access the swf of flash bridge direct, cause a root error:

TypeError: Cannot read property 'options' of undefined
at /Users/gards/testRoom/Socket.IO-node/lib/socket.io/transports/websocket.js:102:19
at Array.forEach (native)

and server stop

Websockets transport broken in Chrome

Hi,

Chrome can't connect to example server, there are no errors in the log.
socket object in client shows connecting = true.

I'm using Node v0.1.94

Potential Run-Time Bug in lib/socket.io/listener.js

Installed Node.js 0.1.91 on DreamHost environment as per:
http://dandean.com/category/code/2010/installing-node-js-on-a-dreamhost-shared-server/

Could not auto-apply the patch, so manually applied patch to appropriate files (make/install).

Attempted running the test, reached this error.

Error: EACCES, Permission denied
at Server.listen (net:952:28)
at Object. (/home/ckgame/downloads/git/Socket.IO-node/lib/socket.io/transports/flashsocket.js:25:4)
at Module._compile (node.js:639:23)
at Module._loadScriptSync (node.js:651:16)
at Module.loadSync (node.js:550:10)
at loadModule (node.js:495:16)
at require (node.js:618:12)
at [object Object]. (/home/ckgame/downloads/git/Socket.IO-node/lib/socket.io/listener.js:45:21)
at Array.forEach (native)
at [object Object].init (/home/ckgame/downloads/git/Socket.IO-node/lib/socket.io/listener.js:43:27)

I'm attempting to resolve it, will update this thread if I do.

Implement WebSocket handshake Sec-* headers

I am having a lot of trouble since i upgraded my chrome browser.
Google changed the handshake or something.
"Sec-WebSocket-Origin" instead of "WebSocket-Origin"

Your script is not able to handle the handshake, i didn't check what your script is doing on chrome if websocket is not compatible - fallback to flash ?

I am currently useing chrome daily build on ubuntu, so maybe tomorrow the bug is fixed anyway - just wanted to inform you ;)

Cannot connect for the example

I tried the example for many times in diff ubuntu and v102 or v103.
the Chat only giving me "connecting..." message. No more "Connected"
Don't know why.
I have do the recursive update for the submodule already.

Please Help

Custom Flash Services Port

This is more of a feature request than an issue, but I don't run my node apps as root, and 843 is one of the privileged ports. I manually patch socket.io to change the port. (I have a iptables rule to NAT 843 to the higher port).

It would be cool if this were an option so I don't have to apply a patch to ever release of socket.io.

Thanks.

Server restart - "Couldnt find client with session id" flood

Hi, when there are active connections - with for example websockets - and if you restart the server, clients will be flooding it(?) ending in "Couldnt find client with session id ..." messages on your console.
Didn't have much time to look into it now, but anyway it is not that serious.
Thanx!

The example chat cant connect to the server in Firefox 3.6.8

For some reason the example chat client cant connect to the server in Firefox 3.6.8.

I've also tried Chrome (6.0.472.11 dev), Safari 5 and Firefox 3.6.7 and it works fine in all, but not in Firefox 3.6.8.

The console gave me this:
[WebSocket] cannot connect to Web Socket server at ws://123.456.789.123:8080/socket.io/flashsocket (SecurityError)
make sure the server is running and Flash socket policy file is correctly placed
http://123.456.789.123:8080/client/socket.io.js
Line 1628

Im using NodeJS v0.1.102

Thanks

EDIT: IE8 doesn't work either (same error as Firefox 3.6.8 when looking in the console)

Error during WebSocket handshake: location mismatch

Hello,

in the latest commit (c023fae) the websocket transport seems broken. chrome reports the following error:

Error during WebSocket handshake: location mismatch: ws://my.domain.tld:8080/socket.io/websocket != ws://reverse.dns.tld/socket.io/websocket

(hosts are examples, but they are different and only the client is configured with a domain name)

xhr-polling doesn't seem to work (ff,chrome,mobilesafari)

Using the 0.3.6 tag,

I succesfully got the demo (fresh checkout) to work using google chrome dev (websockets transport),
ff 3.6 (fallback to flashsocket). I then decide to try my ipod touch but though the server indicated it had connected, on the device itself it clearly had not received any response from the server's initial handshake.

Via telnet and tcpdump, I was able to see that the server appears to be sending a response but for some reason, this isn't picked up by the xhr request.
After sprinkling the client-side socket.io.js script with console.log statements, in mobilesafari, the xhr-polling xhr request's onreadystatechange handler is never even triggered and readyState stays stuck at 1 (apparently)

In order to debug this further, I forced xhr-polling on firefox 3.6 like so:

  •           transports: ['websocket', 'flashsocket', 'htmlfile', 'xhr-multipart', 'xhr-polling'],
    
  •           transports: ['xhr-polling', 'websocket', 'flashsocket', 'htmlfile', 'xhr-multipart'], 
    

I see the following:
firefox 3.6: http://pastebin.com/hZwaphNT
ipod touch: http://pastebin.com/iWx8KJjV
google chrome: http://pastebin.com/EUEwUtUc
curl:
vagrant@vagrantbase:~$ curl -i http://192.168.1.5:8080/socket.io/xhr-polling//1275572169941
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 53
Connection: keep-alive

{"messages":["{"sessionid":"1675476310774684"}"]}vagrant@vagrantbase:~$

At this point I'm not really sure where the issue is.. :(

P.S. I haven't been able to test master yet but I switched to 0.3.6 as websockets wasn't working with master.

Regards,

Saimon

TypeError: Cannot set property 'use_chunked_encoding_by_default' of null

I get this trying to run the chat demo.

node --version:
v0.1.90-111-ga63ce5c

It happens when first loading up the page. It's happening on line 32 of transports/websocket.js.

28 Apr 23:12:49 - socket.io ready - accepting connections
28 Apr 23:12:49 - Initializing client with transport "websocket"
node http server: TypeError: Cannot set property 'use_chunked_encoding_by_default' of null

test crashes

i get

12 May 19:44:57 - socket.io ready - accepting connections
Error: Must have start <= end
at Stream.ondata (http:526:27)
at IOWatcher.callback (net:307:31)
at node.js:748:9

as soon as i connect!

Apache proxy sensitivity

When socket.io-node is behind a Apache proxy, and the proxy is configured with a trailing slash, line 65 in listener.js errors out, as var path = url.parse(req.url).pathname will return undefined.

Reason is that when the apache proxy is configured with a trailing slash:

ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all

ProxyPass /nodejs http://127.0.0.1:8080/
ProxyPassReverse /nodejs http://127.0.0.1:8080/

(the trailing slash is behind http://127.0.0.1:8080) req.url will start with '//' instead of '/' causing url.parse(req.url).pathname to return undefined. Line 65 in listener.js will fail as undefined has no function indexOf.

Solution is of course to prevent the trailing slash, but it would probably be useful to check for a valid path

patch node.js 0.1.91

Is there still a "patch" needed for the latest node.js version(s). Did anybody do a test?

no socket.io.js in lib

this breaks all existing users of this code and is a departure from the common pattern of putting your code in ./lib/

require socket.io.js?

There's some discouraging difference between the example (which is running fine) and the example-code in the docs when it comes to require:
The readme shows './path/to/socket.io', which is a placeholder and probobly not meant to point to the socket.io-folder. The HowTo on the homepage shows './socket.io/socket.io.js', which is not existing.
Can someone clear this up, please ;) A working example would be nice, which doesn't require index.js.

Use binary statemachine to parse websocket frames

Right now, the websocket adapter in the server sets the connection encoding: with this.connection.setEncoding('utf8');

It thus receives the incoming data as utf8 encoded and splits on \ufffd -- the unicode U+FFFD REPLACEMENT CHARACTER. This is inappropriate as it violates the spec, which indicates that the protocol itself is binary and the individual frames should be interpreted as utf8.

Also, the current internet draft of the WebSocket protocol (after Draft 76) uses a completely different framing method which will mandate parsing in binary. It will no longer be possible to read the bytes as UTF-8. See the latest protocol at http://www.whatwg.org/specs/web-socket-protocol/

It may be acceptable for now to keep the current implementation for now and then switch out the frame parsing entirely to handle implementations of the next official draft. However, be aware that a legitimate message could theoretically legitimately contain \ufffd in a position that doesn't indicate a frame boundary, which would break today's parser.

Add session storage adaptors

Right now the session ids and buffered messages are stored in memory. In the event of a node failure, if a client attempts to quickly reconnect, the session id and messages will be lost.

Abstract the storage mechanism to support persistent distributed storage adaptors (ie: redis)

xhr-* transports do not handle cross-domain requests

I noticed that the xhr-* transports do not support cross-domain requests, while the websocket transport does (by checking the listener's origin property).

I didn't realize what the exact problem was until I did a fair amount of digging. It looks like xhr-* transports may have to listen for the 'OPTIONS' HTTP method and respond appropriately for this to work? Apparently the 'OPTIONS' method is a "pre-flight" message that is essentially requesting to make a request to the server and a message has to be sent back for the real (GET in Socket.io's case) request to occur.

I'll try and see if I can get something going, but I wasn't sure if support for this is coming soon or not?

Channels in socket.io

I have not found a way to create channels in socket.io. That's weird because most polling application are not 1:1, but more 1:n. Is there a way to create/publish/subscribe to channels in socket.io?

server fails to start with a regular user

$ node server.js
net:1033
bind(self.fd, arguments[0]);
^
Error: EACCES, Permission denied
at Server.listen (net:1033:28)
at Object. (/home/loxs/itembase/ibRealtime/Socket.IO-node/lib/socket.io/transports/flashsocket.js:25:4)
at Module._compile (module:384:23)
at Module._loadScriptSync (module:393:16)
at Module.loadSync (module:296:10)
at loadModule (module:241:16)
at require (module:364:12)
at [object Object]. (/home/loxs/itembase/ibRealtime/Socket.IO-node/lib/socket.io/listener.js:50:21)
at Array.forEach (native)
at [object Object].init (/home/loxs/itembase/ibRealtime/Socket.IO-node/lib/socket.io/listener.js:48:27)

Errors on starting server.js on with node 0.2.0

Error: Cannot find module './../../support/socket.io-client/lib/io'
at loadModule (node.js:275:15)
at require (node.js:411:14)
at Object. (/Users/macpro/juju/twitter-nodejs-websocket/vendor/socket-io/lib/socket.io/listener.js:6:19)
at Module._compile (node.js:462:23)
at Module._loadScriptSync (node.js:469:10)
at Module.loadSync (node.js:338:12)
at loadModule (node.js:283:14)
at require (node.js:411:14)
at Object. (/Users/macpro/juju/twitter-nodejs-websocket/vendor/socket-io/lib/socket.io/index.js:1:82)
at Module._compile (node.js:462:23

sec-websocket-origin header missing

Getting a sec-websocket-origin header missing error in Webkit nightly with Socket.IO-node 0.3.6 and node 0.1.96. This diff fixes that error:

IE 6.0 fallback without Flash

i put this in a new issue.

on IE 6.0 happens no fallback if flash is not installed - can this be fixed?
socket.connect() returns true and there is nothing "wrong" with the connect - but nothing happens - there is not even a connection going in any way to the server...

thanks!

Can't specify transportOptions

Specifying transportOptions prevents the server from starting up (in 0.3.6):

io.listen(server, {
    transportOptions: { websocket: { closeTimeout: 8000 }},

    ...
});

server fails with output:

/Users/kerin/Projects/socketio/experiments/server/lib/socket.io/util/object.js:23
if (typeof source[key] == 'object') object.merge(source[key], current);                                      ^
ReferenceError: object is not defined
at /Users/kerin/Projects/socketio/experiments/server/lib/socket.io/util/object.js:23:39

Allow multiple listeners to be bound to a server

I've have two distinct types of connections coming at my server - it would seem the easiest way to separate them would be to bind create two io.listeners and change the resource of each connection type - however in the current implementation in Listener.init will just grab the last Listener bound to the server!

p.s Fantastic piece of software!

Chat doesn't work in demo example, works only in google chrome (using websocket)

In mozilla firebug:
[WebSocket] The WebSocket server speaks old WebSocket protocol, which is not supported by web-socket-js. It requires WebSocket protocol 76 or later. Try newer version of the server if available.
socket.io.js (line 2255)

Here is the headers that client sends to server:

8 Jul 07:19:45 - WebSocket
8 Jul 07:19:45 - Upgrade
8 Jul 07:19:45 - 192.168.1.7:8080
8 Jul 07:19:45 - http://192.168.1.7:8080
8 Jul 07:19:45 - 4 <1i 7lA11'672;32
8 Jul 07:19:45 - e2F 6 4 00I Am 290 4 9(%Jw

And than server close connection with this message:
Data incorrectly framed by UA. Dropping connection

Also google chrome sends to server upgrade command too, but it work , headers:

8 Jul 07:22:58 - WebSocket
8 Jul 07:22:58 - Upgrade
8 Jul 07:22:58 - 192.168.1.7:8080
8 Jul 07:22:58 - http://192.168.1.7:8080

I tested it with latest nodejs , and latest modules.

websocket problems with standard 80 port

Hi,
There seems to be a problem when you use the port 80.with websockets/flashsockets in ie7/6 or chrome 6 on windows (maybe in others too..). Interesting is that it works in opera and ff!
Anyway the node terminal shows that they are connected, the client.handshake is true, however ther is no communication and it it disconnects almost imediately... a bit later a consol in ie7 shows an error about digests not matching...
Thanks for looking after it, Peter K.

Ubuntu VM + Demo: cannot call method 'write' error

Hi, I set up an Ubuntu VM and cloned and updated Socket.IO-node. When I browse with Chrome to localhost:8080 nothing happens, no error at all. Neither in the terminal nor in the browser.

But when I change in the chat.html the url from 'localhost' to '127.0.0.1' I get following lines in the terminal:
17 Apr 19:38:26 - socket.io ready - accepting connections
17 Apr 19:38:37 - Initializing client with transport "websocket"
TypeError: Cannot call method 'write' of undefined
at [object Object]._write (/home/david/dev/Socket.IO-node/lib/socket.io/transports/websocket.js:70:19)
at [object Object]._payload (/home/david/dev/Socket.IO-node/lib/socket.io/client.js:60:28)
at [object Object]. (/home/david/dev/Socket.IO-node/lib/socket.io/transports/websocket.js:40:8)
at [object Object]._onConnect (/home/david/dev/Socket.IO-node/lib/vendor/js-oo/lib/oo.js:92:29)
at [object Object].init (/home/david/dev/Socket.IO-node/lib/socket.io/client.js:9:8)
at [object Object].Class (/home/david/dev/Socket.IO-node/lib/vendor/js-oo/lib/oo.js:61:19)
at [object Object]._onConnection (/home/david/dev/Socket.IO-node/lib/socket.io/listener.js:114:17)
at [object Object].check (/home/david/dev/Socket.IO-node/lib/socket.io/listener.js:74:10)
at Server. (/home/david/dev/Socket.IO-node/lib/socket.io/listener.js:35:14)
at HTTPParser.onIncoming (http:528:10)

Any ideas on that? Would really like to get the stuff running on the VM :)

Socket.io dies (uncatchable) on faulty web socket connection

Streamie.org was crashing constantly with a message that in line 23 of websocket.js this.connection did not have a method of "setTimeout"

Because this was the production system I added a line
if(!this.connection.setTimeout) return;

This works around the server-crash issue for me.

I now get this constantly
3 Sep 14:31:07 - Initializing client with transport "websocket"
3 Sep 14:31:07 - WebSocket connection invalid

I suspect a faulty client is reconnecting all the time.

Cannot start server

I've followed the instructions in the readme, and used a freshly patched version of node.js, but I can't get the server to run at all.

Here's some input/output (run from within test directory):

$ node -v
0.1.32
$ node server.js
Error: Cannot find module 'oo'
at loadModuleSync (node.js:592:13)
at require (node.js:732:12)
at Object. (/Users/colin/apps/Socket.IO-node/lib/socket.io.js:2:1)
at Module._loadContent (node.js:753:23)
at Module._loadScriptSync (node.js:768:16)
at Module.loadSync (node.js:665:10)
at loadModuleSync (node.js:595:14)
at require (node.js:732:12)
at Object. (/Users/colin/apps/Socket.IO-node/test/server.js:4:8)
at Module._loadContent (node.js:753:23)

race-condition? chrome websocket 'aw-snap'

Ubuntu 10.04 x86_64, Chrome 5.0.375.86, latest Socket.IO and Socket.IO-node (git pulled 2 minutes ago).

If I send data in a socket.addListener "clientConnect" function, the behaviour is non-deterministic.

I'm using the demo client and slightly-modified server (it just sends data on client connect).

On many occasions the browser shows "got some data: {"sessionid":"19619322172366083"}" (i.e. the connection handshake is escaping to the application layer)
On other occasions it shows the data the server has sent, sometimes multiple times for a single sending.

After 2-4 of the events above, Chrome goes 'aw-snap'.

If I only send data from the server after data has been received from the client, everything is fine.

Also everything is fine if I use xhr.

Regards,

Chris.

Better public .connected property

Right now .connected doesn't indicate if the connection is considered disconnected, but rather if there's an open request for a client. If the client is in a a long-polling disconnection, .connected will be false even though the "socket" is still considered connected.

finalized should be removed, connected should be named open or similar (or maybe use a readyState property with number codes), and an actual connected with the expected behavior should be introduced.

Handshake Failure - no websocket connection made

Using the latest Socket.IO and Socket.IO-node, the websocket handshake seems to be failing. The server never receives the onClientConnect event. This is happening in my own application as well as the chat test application. The browser is Webkit Nightly (Version 4.0.4 (6531.21.10, r60376)). Using tcpdump I can see the http handshake request sent by the browser to the server, but there is no handshake response. Here is the handshake request:

GET /socket.io/websocket HTTP/1.1
Upgrade: WebSocket
Connection: Upgrade
Host: localhost:8080
Origin: http://localhost:8080
Sec-WebSocket-Key1: 2 4947@1342 2
Sec-WebSocket-Key2: 1    2 235 8  25 ; 0  

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.