xref: /unit/test/node/websockets/mirror_fragmentation/app.js (revision 1865:3c551b9721df)
1
2server = require('http').createServer(function() {});
3webSocketServer = require('websocket').server;
4
5server.listen(7080, function() {});
6
7var wsServer = new webSocketServer({
8  httpServer: server
9});
10
11wsServer.on('request', function(request) {
12  //console.log('request');
13  var connection = request.accept(null);
14
15  connection.on('message', function(message) {
16    //console.log('message');
17    connection.send(message.utf8Data);
18  });
19
20  connection.on('close', function(r) {
21      //console.log('close');
22  });
23});
24