diff options
Diffstat (limited to 'webchat/sockjs_server_connection_transport.js')
-rw-r--r-- | webchat/sockjs_server_connection_transport.js | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/webchat/sockjs_server_connection_transport.js b/webchat/sockjs_server_connection_transport.js deleted file mode 100644 index 6f68b955..00000000 --- a/webchat/sockjs_server_connection_transport.js +++ /dev/null @@ -1,26 +0,0 @@ - -module.exports = function make_sockjs_server_connection_transport (connection) { - var transport = {} - - connection.on('data', function (data) { - try { - var message = JSON.parse(data) - } catch (error) { - return console.log('error', error) - } - transport.onmessage(message) - }) - connection.on('close', function () { - }) - - transport.send = function (message) { - try { - var data = JSON.stringify(message) - } catch (error) { - return console.log('sockjs transport send error:', error) - } - connection.write(data) - } - - return transport -} |