summaryrefslogtreecommitdiffstats
path: root/Cancer/webchat/sockjs_server_connection_transport.js
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2013-12-30 17:38:02 +0100
committermakefu <github@syntax-fehler.de>2013-12-30 17:38:02 +0100
commitee33c348658a12a4e54281dc34eaca8639e247f8 (patch)
tree142ea8052af9e75886b6c71979eed302885ab22a /Cancer/webchat/sockjs_server_connection_transport.js
parentefef353ef2bf65ef6123fc699bce6c69fc37cfcc (diff)
parent11de3d6d4c62f7059cdb45992d7d0fec05dde0e4 (diff)
Merge branch 'master' of ssh://github.com/krebscode/painload
Diffstat (limited to 'Cancer/webchat/sockjs_server_connection_transport.js')
-rw-r--r--Cancer/webchat/sockjs_server_connection_transport.js26
1 files changed, 0 insertions, 26 deletions
diff --git a/Cancer/webchat/sockjs_server_connection_transport.js b/Cancer/webchat/sockjs_server_connection_transport.js
deleted file mode 100644
index 6f68b955..00000000
--- a/Cancer/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
-}