Documentation for Meteor.disconnect().

This commit is contained in:
Zoltan Olah
2013-07-24 09:32:45 -07:00
committed by Nick Martin
parent af7e208bd2
commit 853bdb4df2
3 changed files with 15 additions and 2 deletions

View File

@@ -422,8 +422,8 @@ the server. The return value is an object with the following fields:
values are `connected` (the connection is up and
running), `connecting` (disconnected and trying to open a
new connection), `failed` (permanently failed to connect; e.g., the client
and server support different versions of DDP) and `waiting` (failed
to connect and waiting to try to reconnect).
and server support different versions of DDP), `waiting` (failed
to connect and waiting to try to reconnect) and `offline` (user has disconnected the connection).
{{/dtdd}}
{{#dtdd name="retryCount" type="Number"}}
@@ -450,6 +450,8 @@ to get realtime updates.
{{> api_box reconnect}}
{{> api_box disconnect}}
{{> api_box connect}}
To call methods on another Meteor application or subscribe to its data
@@ -472,6 +474,8 @@ sets, call `Meteor.connect` with the URL of the application.
[Meteor.status](#meteor_status).
* `reconnect` -
See [Meteor.reconnect](#meteor_reconnect).
* `disconnect` -
See [Meteor.disconnect](#meteor_disconnect).
* `onReconnect` - Set this to a function to be called as the first step of
reconnecting. This function can call methods which will be executed before
any other outstanding methods. For example, this can be used to re-establish

View File

@@ -447,6 +447,14 @@ Template.api.reconnect = {
"This method does nothing if the client is already connected."]
};
Template.api.disconnect = {
id: "meteor_disconnect",
name: "Meteor.disconnect()",
locus: "Client",
descr: [
"Disconnect the connection to the server."]
};
Template.api.connect = {
id: "meteor_connect",
name: "Meteor.connect(url)",

View File

@@ -139,6 +139,7 @@ var toc = [
{name: "Server connections", id: "connections"}, [
"Meteor.status",
"Meteor.reconnect",
"Meteor.disconnect",
"Meteor.connect"
],