mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Documentation for Meteor.disconnect().
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)",
|
||||
|
||||
@@ -139,6 +139,7 @@ var toc = [
|
||||
{name: "Server connections", id: "connections"}, [
|
||||
"Meteor.status",
|
||||
"Meteor.reconnect",
|
||||
"Meteor.disconnect",
|
||||
"Meteor.connect"
|
||||
],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user