You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removes connection from viola control. Cleans all cached data. Do not neglect this method on connection termination.
137
148
@@ -144,7 +155,7 @@ Returns: nothing
144
155
[Back to TOC](#table-of-contents)
145
156
146
157
receiveData(regId, data)
147
-
---------------
158
+
------------------------------------------
148
159
149
160
This method should be called, when new data is received from web socket. This method analyze all incoming messages, set states and prepare response data for clients.
150
161
@@ -155,11 +166,10 @@ Parameters:
155
166
156
167
Returns: nothing
157
168
158
-
159
169
[Back to TOC](#table-of-contents)
160
170
161
171
getPendingData(regId)
162
-
---------------------------
172
+
------------------------------------------
163
173
164
174
Checks the store for new data for client.
165
175
@@ -174,6 +184,25 @@ Returns:
174
184
175
185
This method is actualy a proxy for redis:lpop() method.
176
186
187
+
[Back to TOC](#table-of-contents)
188
+
189
+
processPostData(sid, realm, data)
190
+
------------------------------------------
191
+
192
+
Process lightweight POST data from client containing a publish message. This method is intended for fast publishing
193
+
an event, for example, in case when WAMP client is a browser application, which makes some changes on backend server,
194
+
so backend is a right place to notify other WAMP subscribers, but making a full WAMP connection is not optimal.
195
+
196
+
Parameters:
197
+
198
+
***sid** - nginx session connection ID
199
+
***realm** - WAMP Realm to operate in
200
+
***data** - data, received through POST (JSON-encoded WAMP publish event)
201
+
202
+
Returns:
203
+
204
+
***response data** (JSON encoded WAMP response message in case of error, or { result = true })
205
+
***httpCode** HTTP status code (HTTP_OK/200 in case of success, HTTP_FORBIDDEN/403 in case of error)
0 commit comments