diff --git a/docs/client/api.html b/docs/client/api.html
index 67c2333c91..ff54f3d4b9 100644
--- a/docs/client/api.html
+++ b/docs/client/api.html
@@ -175,7 +175,7 @@ publish handler, this is the place to stop the observes.
{{> api_box subscription_error}}
{{> api_box subscription_stop}}
-{{> api_box subscription_session}}
+{{> api_box subscription_connection}}
{{> api_box subscribe}}
@@ -278,8 +278,7 @@ invocation object, which provides the following:
begin running.
* `userId`: the id of the current user.
* `setUserId`: a function that associates the current client with a user.
-* `session`: on the server, the [session](#ddp_session) this method
-call came in on.
+* `connection`: on the server, the [connection](#meteor_onconnection) this method call was received on.
Calling `methods` on the client defines *stub* functions associated with
server methods of the same name. You don't have to define a stub for
@@ -332,7 +331,7 @@ invocation from a client won't start until the Nth invocation
returns. However, you can change this by calling `this.unblock`. This
will allow the N+1th invocation to start running in a new fiber.
-{{> api_box method_invocation_session}}
+{{> api_box method_invocation_connection}}
{{> api_box error}}
@@ -479,26 +478,29 @@ The callback is called with a single argument, the server-side
[session](#ddp_session) representing the connection from the client.
-{{> api_box ddp_session}}
+
+{{#dtdd name="id" type="String"}}
+A globally unique id for this connection.
+{{/dtdd}}
+
+{{#dtdd name="close" type="Function"}}
+Close this DDP connection. The client is free to reconnect, but will
+receive a different connection with a new `id` if it does.
+{{/dtdd}}
+
+{{#dtdd name="onClose" type="Function"}}
+Register a callback to be called when the connection is closed.
+{{/dtdd}}
+
{{#note}}
Currently when a client reconnects to the server (such as after
temporarily losing its Internet connection), it will get a new session
each time.
-When session reconnects are implemented, clients will be able to
-reconnect to the same session.
+In the future, when session reconnection is implemented, clients will be
+able to reconnect and resume the same session.
-The `Meteor.onConnection` callback will be called only once for a
-session. A client reconnecting to the same session won't cause the
-callback to be called again.
-
-The client closing the connection won't cause the session to close
-right away because the client might reconnect; instead the session
-will close after a timeout. Once the session has been closed
-(including when the session `close` method is called), a reconnect
-from the client attempting to reuse the session will receive a new
-session instead.
{{/note}}
@@ -3111,11 +3113,6 @@ code can read `data.txt` by running:
{{> api_box_args options}}
{{/if}}
-{{#if fields}}
-Fields
-{{> api_box_args fields}}
-{{/if}}
-
{{#if body}}
{{#better_markdown}}{{{body}}}{{/better_markdown}}
{{/if}}
diff --git a/docs/client/api.js b/docs/client/api.js
index 1dd0fb0d48..e6292200ec 100644
--- a/docs/client/api.js
+++ b/docs/client/api.js
@@ -318,11 +318,11 @@ Template.api.subscription_userId = {
};
-Template.api.subscription_session = {
- id: "publish_session",
- name: "this.session",
+Template.api.subscription_connection = {
+ id: "publish_connection",
+ name: "this.connection",
locus: "Server",
- descr: ["Access inside the publish function. The [session](#ddp_session) this subscription came in on."]
+ descr: ["Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription."]
};
@@ -389,11 +389,11 @@ Template.api.method_invocation_isSimulation = {
descr: ["Access inside a method invocation. Boolean value, true if this invocation is a stub."]
};
-Template.api.method_invocation_session = {
- id: "method_session",
- name: "this.session",
+Template.api.method_invocation_connection = {
+ id: "method_connection",
+ name: "this.connection",
locus: "Server",
- descr: ["Access inside a method invocation. The [session](#meteor_onconnection) this method call came in on."]
+ descr: ["Access inside a method invocation. The [connection](#meteor_onconnection) this method was received on."]
};
Template.api.error = {
@@ -502,32 +502,10 @@ Template.api.onConnection = {
args: [
{name: "callback",
type: "function",
- descr: "The function to call with the session when a new DDP connection is established."}
+ descr: "The function to call when a new DDP connection is established."}
]
};
-Template.api.ddp_session = {
- id: "ddp_session",
- name: "DDP.Session",
- locus: "Server",
- descr: ["On the server, this object represents a connection from a client."],
- fields: [
- {name: "id",
- type: "String",
- descr: "The globally unique session id."
- },
- {name: "close",
- type: "Function",
- descr: "Close this session and the associated DDP connection. The client is free to reconnect, but will receive a different session if it does."
- },
- {name: "onClose",
- type: "Function",
- descr: "Register a callback to be called when the session is closed."
- }
- ]
-};
-
-
// onAutopublish
Template.api.meteor_collection = {
diff --git a/docs/client/docs.js b/docs/client/docs.js
index 6fafc02dbd..4ecb004ab5 100644
--- a/docs/client/docs.js
+++ b/docs/client/docs.js
@@ -123,7 +123,7 @@ var toc = [
{instance: "this", name: "onStop", id: "publish_onstop"},
{instance: "this", name: "error", id: "publish_error"},
{instance: "this", name: "stop", id: "publish_stop"},
- {instance: "this", name: "session", id: "publish_session"}
+ {instance: "this", name: "connection", id: "publish_connection"}
],
"Meteor.subscribe"
],
@@ -134,7 +134,7 @@ var toc = [
{instance: "this", name: "setUserId", id: "method_setUserId"},
{instance: "this", name: "isSimulation", id: "method_issimulation"},
{instance: "this", name: "unblock", id: "method_unblock"},
- {instance: "this", name: "session", id: "method_session"}
+ {instance: "this", name: "connection", id: "method_connection"}
],
"Meteor.Error",
"Meteor.call",
@@ -146,7 +146,6 @@ var toc = [
"Meteor.reconnect",
"Meteor.disconnect",
"Meteor.onConnection",
- "DDP.Session",
"DDP.connect"
],