Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Allow the SockJS server to connect to WebSocket clients. #69

Closed
wants to merge 1 commit into from

3 participants

@AndyMoreland

This commit allows the SockJS server to connect to WebSocket clients on the url http://site:port+1/sockjs/websocket.

I understand that there are issues with websockets on the client, so I've left that disabled, but I'm not sure why they were disabled on the server. This change allows non-browsers to easily interact with the meteor server. I'm working on an implementation of DDP for other languages and this is the only way that sockjs supports non-browser clients speaking to it.

If there is a compelling reason to disable websockets server-side, then I'll try to go through the rigamarole of reimplementing SockJS's protocol outside of the browser..

@AndyMoreland AndyMoreland Allow the SockJS server to connect to WebSocket clients.
This commit allows the SockJS server to connect to WebSocket clients on the url http://site:port+1/sockjs/websocket.

I understand that there are issues with websockets on the client, so I've left that disabled, but I'm not sure why they were disabled on the server. This change allows non-browsers to easily interact with the meteor server. I'm working on an implementation of DDP for other languages and this is the only way that sockjs supports non-browser clients speaking to it.

If there is a compelling reason to disable websockets server-side, then I'll try to go through the rigamarole of reimplementing SockJS's protocol outside of the browser..
b5921bd
@n1mmy
Owner

f00a8a2

Looking forward to seeing what you build with non-browser DDP clients!

Note that we'll be specifying DDP more formally soon, and that will likely entail changes, especially around specifying the transport and URLs to connect to, etc. We will definitely include a raw websockets option, or very close to it. But no promises of backwards compatibility to the current code.

@n1mmy n1mmy closed this
@majek

Just a heads up. If you want to interact with SockJS from non-browsers you can:

  • Use "raw websockets" interface that SockJS exposes (see SockJS README)
  • Use our "sockjs-client-node" client if you can't use websockets for some reason (for example if you're behind a broken proxy) - https://github.com/sockjs/sockjs-client-node

Also, AFAIR in Meteor websockets are disabled on the client-side, so this change should not break anything.

@AndyMoreland
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 20, 2012
  1. @AndyMoreland

    Allow the SockJS server to connect to WebSocket clients.

    AndyMoreland authored
    This commit allows the SockJS server to connect to WebSocket clients on the url http://site:port+1/sockjs/websocket.
    
    I understand that there are issues with websockets on the client, so I've left that disabled, but I'm not sure why they were disabled on the server. This change allows non-browsers to easily interact with the meteor server. I'm working on an implementation of DDP for other languages and this is the only way that sockjs supports non-browser clients speaking to it.
    
    If there is a compelling reason to disable websockets server-side, then I'll try to go through the rigamarole of reimplementing SockJS's protocol outside of the browser..
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  packages/stream/stream_server.js
View
2  packages/stream/stream_server.js
@@ -13,7 +13,7 @@ Meteor._StreamServer = function () {
// set up socket.io
var sockjs = __meteor_bootstrap__.require('sockjs');
self.server = sockjs.createServer({
- prefix: '/sockjs', websocket: false, log: function(){},
+ prefix: '/sockjs', log: function(){},
jsessionid: false});
self.server.installHandlers(__meteor_bootstrap__.app);
Something went wrong with that request. Please try again.