From 2603f9a79dd6e65adb380df44b6b81bce181ed72 Mon Sep 17 00:00:00 2001 From: bgrossiord Date: Fri, 21 Jan 2022 16:10:29 +0100 Subject: [PATCH] Update sails.io.js.md I tried on sails version 1.5.2 and sails.io.js is in folder dependency not /js/dependency --- docs/reference/websockets/sails.io.js/sails.io.js.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/reference/websockets/sails.io.js/sails.io.js.md b/docs/reference/websockets/sails.io.js/sails.io.js.md index 7e0f697a14..b140386a47 100644 --- a/docs/reference/websockets/sails.io.js/sails.io.js.md +++ b/docs/reference/websockets/sails.io.js/sails.io.js.md @@ -14,7 +14,7 @@ The main responsibility of `sails.io.js` is to provide a familiar, Ajax-like int ### Basic usage (browser) -In the browser, all that is required to use `sails.io.js` is to include the library in a ` + ``` and then use `io.socket` as a global variable in subsequent inline or external scripts. For detailed instructions and examples of everyday usage, see [`io.socket`](https://sailsjs.com/documentation/reference/web-sockets/socket-client/io-socket). @@ -56,7 +56,7 @@ There are two ways to configure Sails' socket client in the browser: using HTML The easiest way to configure the four most common settings for the socket client (`autoConnect`, `environment`, `headers`, and `url`) is by sticking one or more HTML attributes on the script tag: ```html - + @@ -120,7 +120,7 @@ Yes. The Sails socket client can be used to great effect with any front-end fra No. The Sails socket client is extremely helpful when building realtime/chat features in a browser-based UI, but like the rest of the `assets/` directory, it is probably not particularly useful if you are building a [native Android app](https://stackoverflow.com/questions/25081188/sending-socket-request-from-client-ios-android-to-sails-js-server/25081189#25081189) or an API with no user interface at all. -Fortunately, like every other boilerplate file and folder in Sails, the socket client is completely optional. To remove it, just delete `assets/js/dependencies/sails.io.js`. +Fortunately, like every other boilerplate file and folder in Sails, the socket client is completely optional. To remove it, just delete `assets/dependencies/sails.io.js`. ##### How does this work? @@ -132,7 +132,7 @@ Under the hood, the socket client (`sails.io.js`) emits Socket.IO messages with By default, a socket connection will be linked to the current browser session (if any) using the `cookie` header that is sent with the initial socket handshake. In order to turn off this behavior, add `nosession=true` to the [`query` property](https://sailsjs.com/documentation/reference/web-sockets/socket-client/sails-socket/properties#?advanced-properties) of the socket before it connects. For example: ``` - + ```