Skip to content

Commit

Permalink
fold stream package into livedata. tests pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
gschmidt committed Dec 21, 2012
1 parent 821a237 commit 0368441
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 28 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @param url {String} URL to Meteor app
// "http://subdomain.meteor.com/" or "/" or
// "ddp+sockjs://foo-**.meteor.com/sockjs"
Meteor._Stream = function (url) {
Meteor._DdpClientStream = function (url) {
var self = this;

self.rawUrl = url;
Expand Down Expand Up @@ -63,7 +63,7 @@ Meteor._Stream = function (url) {
self._launch_connection();
};

_.extend(Meteor._Stream, {
_.extend(Meteor._DdpClientStream, {
// @param url {String} URL to Meteor app, eg:
// "/" or "madewith.meteor.com" or "https://foo.meteor.com"
// or "ddp+sockjs://ddp--****-foo.meteor.com/sockjs"
Expand Down Expand Up @@ -113,7 +113,7 @@ _.extend(Meteor._Stream, {
}
});

_.extend(Meteor._Stream.prototype, {
_.extend(Meteor._DdpClientStream.prototype, {
// Register for callbacks.
on: function (name, callback) {
var self = this;
Expand Down Expand Up @@ -337,7 +337,7 @@ _.extend(Meteor._Stream.prototype, {
// can connect to random hostnames and get around browser per-host
// connection limits.
self.socket = new SockJS(
Meteor._Stream._toSockjsUrl(self.rawUrl),
Meteor._DdpClientStream._toSockjsUrl(self.rawUrl),
undefined, {
debug: false, protocols_whitelist: [
// only allow polling protocols. no websockets or streaming.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Meteor._StreamServer = function () {
Meteor._DdpStreamServer = function () {
var self = this;
self.registration_callbacks = [];
self.open_sockets = [];
Expand Down Expand Up @@ -57,7 +57,7 @@ Meteor._StreamServer = function () {

};

_.extend(Meteor._StreamServer.prototype, {
_.extend(Meteor._DdpStreamServer.prototype, {
// call my callback when a new socket connects.
// also call it for all current connections.
register: function (callback) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ testAsyncMulti("stream - reconnect", [

Tinytest.add("stream - sockjs urls are computed correctly", function(test) {
var testHasSockjsUrl = function(raw, expectedSockjsUrl) {
var actual = Meteor._Stream._toSockjsUrl(raw);
var actual = Meteor._DdpClientStream._toSockjsUrl(raw);
if (expectedSockjsUrl instanceof RegExp)
test.isTrue(actual.match(expectedSockjsUrl));
else
Expand Down
21 changes: 0 additions & 21 deletions packages/stream/package.js

This file was deleted.

0 comments on commit 0368441

Please sign in to comment.