-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathx.json
314 lines (314 loc) · 10.2 KB
/
x.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
{
"name": "sockjs",
"description": "Sockjs for Chiχ",
"version": "0.0.3",
"repository": {
"type": "git",
"url": "https://github.com/nodule/sockjs.git"
},
"dependencies": {
"sockjs": "0.x.x",
"websocket-multiplex": "0.x.x"
},
"nodes": [
{
"name": "close",
"ns": "sockjs",
"description": "Close Connection",
"phrases": {
"active": "Closing Connection"
},
"ports": {
"input": {
"conn": {
"type": "Connection",
"title": "SockJS Connection",
"required": true
},
"code": {
"type": "integer",
"title": "Status Code",
"required": true
},
"message": {
"type": "any",
"title": "Close message",
"required": true
}
},
"output": {}
},
"env": "server",
"fn": "output = function() {\n $.conn.close($.code, $.message);\n}\n"
},
{
"name": "closeEvent",
"ns": "sockjs",
"description": "Close Connection Event",
"phrases": {
"active": "Received Connection Close event"
},
"ports": {
"input": {
"conn": {
"type": "Connection",
"title": "SockJS Connection",
"required": true,
"description": "SockJS Connection"
},
"callback": {
"type": "function",
"title": "Callback Function",
"required": true
}
},
"output": {}
},
"env": "server",
"fn": "output = [$.server, 'on', 'connection'];\n"
},
{
"name": "connection",
"ns": "sockjs",
"description": "Connection Event",
"phrases": {
"active": "Connection event"
},
"ports": {
"input": {
"server": {
"type": "Server",
"title": "SockJS server",
"required": true,
"description": "SockJS Server"
}
},
"output": {
"conn": {
"type": "Connection",
"title": "SockJS Connection",
"description": "SockJS Connection"
}
}
},
"env": "server",
"fn": "output = [$.server, 'on', 'connection'];\n"
},
{
"name": "createServer",
"ns": "sockjs",
"description": "SockJS server",
"phrases": {
"active": "Creating SockJS server"
},
"ports": {
"input": {
"url": {
"type": "string",
"title": "SockJS Url",
"description": "Transports which don't support cross-domain communication natively ('eventsource' to name one) use an iframe trick. A simple page is served from the SockJS server (using its foreign domain) and is placed in an invisible iframe. Code run from this iframe doesn't need to worry about cross-domain issues, as it's being run from domain local to the SockJS server. This iframe also does need to load SockJS javascript client library, and this option lets you specify its url (if you're unsure, point it to the latest minified SockJS client release, this is the default). You must explicitly specify this url on the server side for security reasons - we don't want the possibility of running any foreign javascript within the SockJS domain (aka cross site scripting attack). Also, sockjs javascript library is probably already cached by the browser - it makes sense to reuse the sockjs url you're using in normally.",
"default": "http://cdn.sockjs.org/sockjs-0.3.min.js"
},
"prefix": {
"type": "string",
"title": "Prefix",
"description": "A url prefix for the server. All http requests which paths begins with selected prefix will be handled by SockJS. All other requests will be passed through, to previously registered handlers.",
"default": "/"
},
"response_limit": {
"type": "integer",
"title": "Response Limit",
"description": "Most streaming transports save responses on the client side and don't free memory used by delivered messages. Such transports need to be garbage-collected once in a while. `response_limit` sets a minimum number of bytes that can be send over a single http streaming request before it will be closed. After that client needs to open new request. Setting this value to one effectively disables streaming and will make streaming transports to behave like polling transports. The default value is 128K.",
"default": 131072
},
"websocket": {
"type": "boolean",
"title": "Websocket?",
"description": "Some load balancers don't support websockets. This option can be used to disable websockets support by the server. By default websockets are enabled.",
"default": true
},
"heartbeat_delay": {
"type": "number",
"title": "Heartbeat Delay",
"description": "In order to keep proxies and load balancers from closing long running http requests we need to pretend that the connection is active and send a heartbeat packet once in a while. This setting controls how often this is done. By default a heartbeat packet is sent every 25 seconds.",
"default": 25
},
"disconnect_delay": {
"type": "number",
"title": "Disconnect Delay",
"description": "The server sends a `close` event when a client receiving connection have not been seen for a while. This delay is configured by this setting. By default the `close` event will be emitted when a receiving connection wasn't seen for 5 seconds.",
"default": 5
}
},
"output": {
"server": {
"type": "Server",
"title": "Server"
}
}
},
"dependencies": {
"npm": {
"sockjs": "0.x.x"
}
},
"env": "server",
"fn": "var server = sockjs.createServer({\n sockjs_url: $.url,\n prefix: $.prefix,\n response_limit: $.response_limit,\n websocket: $.websocket,\n heartbeat_delay: $.heartbeat_delay,\n disconnect_delay: $.disconnect_delay\n});\n\noutput = {server: $.create(server)};\n"
},
{
"name": "data",
"ns": "sockjs",
"description": "Connection Data Event",
"phrases": {
"active": "Receiving connection data"
},
"ports": {
"input": {
"conn": {
"type": "Connection",
"title": "SockJS Connection",
"required": true,
"description": "SockJS Connection"
}
},
"output": {
"message": {
"type": "string",
"title": "Message",
"description": "Message"
}
}
},
"env": "server",
"fn": "output = [$.conn, 'on', 'data'];\n"
},
{
"name": "InstallHandlers",
"ns": "sockjs",
"description": "SockJS Install Handlers",
"phrases": {
"active": "Installing Handlers"
},
"ports": {
"input": {
"server": {
"type": "Server",
"title": "SockJS server",
"required": true,
"description": "SockJS Server"
},
"http": {
"type": "Server",
"title": "HTTP server",
"required": true,
"description": "Node.js HTTP Server"
},
"prefix": {
"type": "string",
"title": "Prefix",
"description": "A url prefix for the server. All http requests which paths begins with selected prefix will be handled by SockJS. All other requests will be passed through, to previously registered handlers."
}
},
"output": {
"server": {
"type": "Server",
"title": "SockJS server",
"description": "SockJS Server"
}
}
},
"env": "server",
"fn": "$.server.installHandlers($.http, {\n prefix: $.prefix\n});\noutput = {server: $.create($.server)};\n"
},
{
"name": "multiplex",
"ns": "sockjs",
"title": "MultiPlexer",
"description": "SockJS Multiplexer",
"phrases": {
"active": "Multiplexing"
},
"ports": {
"input": {
"service": {
"type": "object",
"title": "Service",
"required": true
}
},
"output": {
"multiplex": {
"type": "MultiplexServer",
"title": "MultiPlexer"
}
}
},
"dependencies": {
"npm": {
"websocket-multiplex": "0.x.x"
}
},
"env": "server",
"fn": "output.multiplex = $.create(new websocket_multiplex.MultiplexServer($.service))\n"
},
{
"name": "registerChannel",
"ns": "sockjs",
"title": "Register Channel",
"description": "SockJS Multiplex Channel Register",
"phrases": {
"active": "Registering channel {{input.channel}}"
},
"ports": {
"input": {
"multiplex": {
"type": "MultiplexServer",
"title": "MultiPlex",
"required": true
},
"channel": {
"type": "string",
"title": "Channel",
"required": true
}
},
"output": {
"out": {
"type": "Channel",
"title": "Channel"
}
}
},
"env": "server",
"fn": "output.out = $.create($.multiplex.registerChannel($.channel));\n"
},
{
"name": "write",
"ns": "sockjs",
"title": "SockJS Write",
"description": "Connection Write",
"phrases": {
"active": "Writing message"
},
"ports": {
"input": {
"message": {
"type": "any",
"title": "Message",
"required": true
},
"conn": {
"type": "Connection",
"title": "SockJS Connection",
"required": true,
"description": "SockJS Connection"
}
},
"output": {}
},
"env": "server",
"fn": "output = function() {\n $.conn.write($.message);\n}\n"
}
],
"env": "server"
}