|
@@ -1,523 +0,0 @@
|
1
|
|
-/* global $, config, JitsiMeetJS */
|
2
|
|
-import 'jquery';
|
3
|
|
-import { setConfigFromURLParams } from '../../react/features/base/config/functions';
|
4
|
|
-import { parseURLParams } from '../../react/features/base/util/parseURLParams';
|
5
|
|
-import { parseURIString } from '../../react/features/base/util/uri';
|
6
|
|
-import { validateLastNLimits, limitLastN } from '../../react/features/base/lastn/functions';
|
7
|
|
-
|
8
|
|
-setConfigFromURLParams(config, {}, {}, window.location);
|
9
|
|
-
|
10
|
|
-const params = parseURLParams(window.location, false, 'hash');
|
11
|
|
-const { isHuman = false } = params;
|
12
|
|
-const {
|
13
|
|
- localVideo = config.startWithVideoMuted !== true,
|
14
|
|
- remoteVideo = isHuman,
|
15
|
|
- remoteAudio = isHuman,
|
16
|
|
- autoPlayVideo = config.testing.noAutoPlayVideo !== true,
|
17
|
|
- stageView = config.disableTileView,
|
18
|
|
- numClients = 1,
|
19
|
|
- clientInterval = 100 // ms
|
20
|
|
-} = params;
|
21
|
|
-
|
22
|
|
-let {
|
23
|
|
- localAudio = config.startWithAudioMuted !== true,
|
24
|
|
-} = params;
|
25
|
|
-
|
26
|
|
-const { room: roomName } = parseURIString(window.location.toString());
|
27
|
|
-
|
28
|
|
-class LoadTestClient {
|
29
|
|
- constructor(id) {
|
30
|
|
- this.id = id;
|
31
|
|
- this.connection = null;
|
32
|
|
- this.connected = false;
|
33
|
|
- this.room = null;
|
34
|
|
- this.numParticipants = 1;
|
35
|
|
- this.localTracks = [];
|
36
|
|
- this.remoteTracks = {};
|
37
|
|
- this.maxFrameHeight = 0;
|
38
|
|
- this.selectedParticipant = null;
|
39
|
|
- }
|
40
|
|
-
|
41
|
|
- /**
|
42
|
|
- * Simple emulation of jitsi-meet's screen layout behavior
|
43
|
|
- */
|
44
|
|
- updateMaxFrameHeight() {
|
45
|
|
- if (!this.connected) {
|
46
|
|
- return;
|
47
|
|
- }
|
48
|
|
-
|
49
|
|
- let newMaxFrameHeight;
|
50
|
|
-
|
51
|
|
- if (stageView) {
|
52
|
|
- newMaxFrameHeight = 2160;
|
53
|
|
- }
|
54
|
|
- else {
|
55
|
|
- if (this.numParticipants <= 2) {
|
56
|
|
- newMaxFrameHeight = 720;
|
57
|
|
- } else if (this.numParticipants <= 4) {
|
58
|
|
- newMaxFrameHeight = 360;
|
59
|
|
- } else {
|
60
|
|
- this.newMaxFrameHeight = 180;
|
61
|
|
- }
|
62
|
|
- }
|
63
|
|
-
|
64
|
|
- if (this.room && this.maxFrameHeight !== newMaxFrameHeight) {
|
65
|
|
- this.maxFrameHeight = newMaxFrameHeight;
|
66
|
|
- this.room.setReceiverVideoConstraint(this.maxFrameHeight);
|
67
|
|
- }
|
68
|
|
- }
|
69
|
|
-
|
70
|
|
- /**
|
71
|
|
- * Simple emulation of jitsi-meet's lastN behavior
|
72
|
|
- */
|
73
|
|
- updateLastN() {
|
74
|
|
- if (!this.connected) {
|
75
|
|
- return;
|
76
|
|
- }
|
77
|
|
-
|
78
|
|
- let lastN = typeof config.channelLastN === 'undefined' ? -1 : config.channelLastN;
|
79
|
|
-
|
80
|
|
- const limitedLastN = limitLastN(this.numParticipants, validateLastNLimits(config.lastNLimits));
|
81
|
|
-
|
82
|
|
- if (limitedLastN !== undefined) {
|
83
|
|
- lastN = lastN === -1 ? limitedLastN : Math.min(limitedLastN, lastN);
|
84
|
|
- }
|
85
|
|
-
|
86
|
|
- if (lastN === this.room.getLastN()) {
|
87
|
|
- return;
|
88
|
|
- }
|
89
|
|
-
|
90
|
|
- this.room.setLastN(lastN);
|
91
|
|
- }
|
92
|
|
-
|
93
|
|
- /**
|
94
|
|
- * Helper function to query whether a participant ID is a valid ID
|
95
|
|
- * for stage view.
|
96
|
|
- */
|
97
|
|
- isValidStageViewParticipant(id) {
|
98
|
|
- return (id !== room.myUserId() && room.getParticipantById(id));
|
99
|
|
- }
|
100
|
|
-
|
101
|
|
- /**
|
102
|
|
- * Simple emulation of jitsi-meet's stage view participant selection behavior.
|
103
|
|
- * Doesn't take into account pinning or screen sharing, and the initial behavior
|
104
|
|
- * is slightly different.
|
105
|
|
- * @returns Whether the selected participant changed.
|
106
|
|
- */
|
107
|
|
- selectStageViewParticipant(selected, previous) {
|
108
|
|
- let newSelectedParticipant;
|
109
|
|
-
|
110
|
|
- if (this.isValidStageViewParticipant(selected)) {
|
111
|
|
- newSelectedParticipant = selected;
|
112
|
|
- }
|
113
|
|
- else {
|
114
|
|
- newSelectedParticipant = previous.find(isValidStageViewParticipant);
|
115
|
|
- }
|
116
|
|
- if (newSelectedParticipant && newSelectedParticipant !== this.selectedParticipant) {
|
117
|
|
- this.selectedParticipant = newSelectedParticipant;
|
118
|
|
- return true;
|
119
|
|
- }
|
120
|
|
- return false;
|
121
|
|
- }
|
122
|
|
-
|
123
|
|
- /**
|
124
|
|
- * Simple emulation of jitsi-meet's selectParticipants behavior
|
125
|
|
- */
|
126
|
|
- selectParticipants() {
|
127
|
|
- if (!this.connected) {
|
128
|
|
- return;
|
129
|
|
- }
|
130
|
|
- if (stageView) {
|
131
|
|
- if (this.selectedParticipant) {
|
132
|
|
- this.room.selectParticipants([this.selectedParticipant]);
|
133
|
|
- }
|
134
|
|
- }
|
135
|
|
- else {
|
136
|
|
- /* jitsi-meet's current Tile View behavior. */
|
137
|
|
- const ids = this.room.getParticipants().map(participant => participant.getId());
|
138
|
|
- this.room.selectParticipants(ids);
|
139
|
|
- }
|
140
|
|
- }
|
141
|
|
-
|
142
|
|
- /**
|
143
|
|
- * Called when number of participants changes.
|
144
|
|
- */
|
145
|
|
- setNumberOfParticipants() {
|
146
|
|
- if (this.id === 0) {
|
147
|
|
- $('#participants').text(this.numParticipants);
|
148
|
|
- }
|
149
|
|
- if (!stageView) {
|
150
|
|
- this.selectParticipants();
|
151
|
|
- this.updateMaxFrameHeight();
|
152
|
|
- }
|
153
|
|
- this.updateLastN();
|
154
|
|
- }
|
155
|
|
-
|
156
|
|
- /**
|
157
|
|
- * Called when ICE connects
|
158
|
|
- */
|
159
|
|
- onConnectionEstablished() {
|
160
|
|
- this.connected = true;
|
161
|
|
-
|
162
|
|
- this.selectParticipants();
|
163
|
|
- this.updateMaxFrameHeight();
|
164
|
|
- this.updateLastN();
|
165
|
|
- }
|
166
|
|
-
|
167
|
|
- /**
|
168
|
|
- * Handles dominant speaker changed.
|
169
|
|
- * @param id
|
170
|
|
- */
|
171
|
|
- onDominantSpeakerChanged(selected, previous) {
|
172
|
|
- if (this.selectStageViewParticipant(selected, previous)) {
|
173
|
|
- this.selectParticipants();
|
174
|
|
- }
|
175
|
|
- this.updateMaxFrameHeight();
|
176
|
|
- }
|
177
|
|
-
|
178
|
|
- /**
|
179
|
|
- * Handles local tracks.
|
180
|
|
- * @param tracks Array with JitsiTrack objects
|
181
|
|
- */
|
182
|
|
- onLocalTracks(tracks = []) {
|
183
|
|
- this.localTracks = tracks;
|
184
|
|
- for (let i = 0; i < this.localTracks.length; i++) {
|
185
|
|
- if (this.localTracks[i].getType() === 'video') {
|
186
|
|
- if (this.id === 0) {
|
187
|
|
- $('body').append(`<video ${autoPlayVideo ? 'autoplay="1" ' : ''}id='localVideo${i}' />`);
|
188
|
|
- this.localTracks[i].attach($(`#localVideo${i}`)[0]);
|
189
|
|
- }
|
190
|
|
-
|
191
|
|
- this.room.addTrack(this.localTracks[i]);
|
192
|
|
- } else {
|
193
|
|
- if (localAudio) {
|
194
|
|
- this.room.addTrack(this.localTracks[i]);
|
195
|
|
- } else {
|
196
|
|
- this.localTracks[i].mute();
|
197
|
|
- }
|
198
|
|
-
|
199
|
|
- if (this.id === 0) {
|
200
|
|
- $('body').append(
|
201
|
|
- `<audio autoplay='1' muted='true' id='localAudio${i}' />`);
|
202
|
|
- this.localTracks[i].attach($(`#localAudio${i}`)[0]);
|
203
|
|
- }
|
204
|
|
- }
|
205
|
|
- }
|
206
|
|
- }
|
207
|
|
-
|
208
|
|
- /**
|
209
|
|
- * Handles remote tracks
|
210
|
|
- * @param track JitsiTrack object
|
211
|
|
- */
|
212
|
|
- onRemoteTrack(track) {
|
213
|
|
- if (track.isLocal()
|
214
|
|
- || (track.getType() === 'video' && !remoteVideo) || (track.getType() === 'audio' && !remoteAudio)) {
|
215
|
|
- return;
|
216
|
|
- }
|
217
|
|
- const participant = track.getParticipantId();
|
218
|
|
-
|
219
|
|
- if (!this.remoteTracks[participant]) {
|
220
|
|
- this.remoteTracks[participant] = [];
|
221
|
|
- }
|
222
|
|
-
|
223
|
|
- if (this.id !== 0) {
|
224
|
|
- return;
|
225
|
|
- }
|
226
|
|
-
|
227
|
|
- const idx = this.remoteTracks[participant].push(track);
|
228
|
|
- const id = participant + track.getType() + idx;
|
229
|
|
-
|
230
|
|
- if (track.getType() === 'video') {
|
231
|
|
- $('body').append(`<video autoplay='1' id='${id}' />`);
|
232
|
|
- } else {
|
233
|
|
- $('body').append(`<audio autoplay='1' id='${id}' />`);
|
234
|
|
- }
|
235
|
|
- track.attach($(`#${id}`)[0]);
|
236
|
|
- }
|
237
|
|
-
|
238
|
|
- /**
|
239
|
|
- * That function is executed when the conference is joined
|
240
|
|
- */
|
241
|
|
- onConferenceJoined() {
|
242
|
|
- console.log(`Participant ${this.id} Conference joined`);
|
243
|
|
- }
|
244
|
|
-
|
245
|
|
- /**
|
246
|
|
- * Handles start muted events, when audio and/or video are muted due to
|
247
|
|
- * startAudioMuted or startVideoMuted policy.
|
248
|
|
- */
|
249
|
|
- onStartMuted() {
|
250
|
|
- // Give it some time, as it may be currently in the process of muting
|
251
|
|
- setTimeout(() => {
|
252
|
|
- const localAudioTrack = this.room.getLocalAudioTrack();
|
253
|
|
-
|
254
|
|
- if (localAudio && localAudioTrack && localAudioTrack.isMuted()) {
|
255
|
|
- localAudioTrack.unmute();
|
256
|
|
- }
|
257
|
|
-
|
258
|
|
- const localVideoTrack = this.room.getLocalVideoTrack();
|
259
|
|
-
|
260
|
|
- if (localVideo && localVideoTrack && localVideoTrack.isMuted()) {
|
261
|
|
- localVideoTrack.unmute();
|
262
|
|
- }
|
263
|
|
- }, 2000);
|
264
|
|
- }
|
265
|
|
-
|
266
|
|
- /**
|
267
|
|
- *
|
268
|
|
- * @param id
|
269
|
|
- */
|
270
|
|
- onUserJoined(id) {
|
271
|
|
- this.numParticipants++;
|
272
|
|
- this.setNumberOfParticipants();
|
273
|
|
- this.remoteTracks[id] = [];
|
274
|
|
- }
|
275
|
|
-
|
276
|
|
- /**
|
277
|
|
- *
|
278
|
|
- * @param id
|
279
|
|
- */
|
280
|
|
- onUserLeft(id) {
|
281
|
|
- this.numParticipants--;
|
282
|
|
- this.setNumberOfParticipants();
|
283
|
|
- if (!this.remoteTracks[id]) {
|
284
|
|
- return;
|
285
|
|
- }
|
286
|
|
-
|
287
|
|
- if (this.id !== 0) {
|
288
|
|
- return;
|
289
|
|
- }
|
290
|
|
-
|
291
|
|
- const tracks = this.remoteTracks[id];
|
292
|
|
-
|
293
|
|
- for (let i = 0; i < tracks.length; i++) {
|
294
|
|
- const container = $(`#${id}${tracks[i].getType()}${i + 1}`)[0];
|
295
|
|
-
|
296
|
|
- if (container) {
|
297
|
|
- tracks[i].detach(container);
|
298
|
|
- container.parentElement.removeChild(container);
|
299
|
|
- }
|
300
|
|
- }
|
301
|
|
- }
|
302
|
|
-
|
303
|
|
- /**
|
304
|
|
- * Handles private messages.
|
305
|
|
- *
|
306
|
|
- * @param {string} id - The sender ID.
|
307
|
|
- * @param {string} text - The message.
|
308
|
|
- * @returns {void}
|
309
|
|
- */
|
310
|
|
- onPrivateMessage(id, text) {
|
311
|
|
- switch (text) {
|
312
|
|
- case 'video on':
|
313
|
|
- this.onVideoOnMessage();
|
314
|
|
- break;
|
315
|
|
- }
|
316
|
|
- }
|
317
|
|
-
|
318
|
|
- /**
|
319
|
|
- * Handles 'video on' private messages.
|
320
|
|
- *
|
321
|
|
- * @returns {void}
|
322
|
|
- */
|
323
|
|
- onVideoOnMessage() {
|
324
|
|
- console.debug(`Participant ${this.id}: Turning my video on!`);
|
325
|
|
-
|
326
|
|
- const localVideoTrack = this.room.getLocalVideoTrack();
|
327
|
|
-
|
328
|
|
- if (localVideoTrack && localVideoTrack.isMuted()) {
|
329
|
|
- console.debug(`Participant ${this.id}: Unmuting existing video track.`);
|
330
|
|
- localVideoTrack.unmute();
|
331
|
|
- } else if (!localVideoTrack) {
|
332
|
|
- JitsiMeetJS.createLocalTracks({ devices: ['video'] })
|
333
|
|
- .then(([videoTrack]) => videoTrack)
|
334
|
|
- .catch(console.error)
|
335
|
|
- .then(videoTrack => {
|
336
|
|
- return this.room.replaceTrack(null, videoTrack);
|
337
|
|
- })
|
338
|
|
- .then(() => {
|
339
|
|
- console.debug(`Participant ${this.id}: Successfully added a new video track for unmute.`);
|
340
|
|
- });
|
341
|
|
- } else {
|
342
|
|
- console.log(`Participant ${this.id}: No-op! We are already video unmuted!`);
|
343
|
|
- }
|
344
|
|
- }
|
345
|
|
-
|
346
|
|
- /**
|
347
|
|
- * This function is called to connect.
|
348
|
|
- */
|
349
|
|
- connect() {
|
350
|
|
- this._onConnectionSuccess = this.onConnectionSuccess.bind(this)
|
351
|
|
- this._onConnectionFailed = this.onConnectionFailed.bind(this)
|
352
|
|
- this._disconnect = this.disconnect.bind(this)
|
353
|
|
-
|
354
|
|
- this.connection = new JitsiMeetJS.JitsiConnection(null, null, config);
|
355
|
|
- this.connection.addEventListener(JitsiMeetJS.events.connection.CONNECTION_ESTABLISHED, this._onConnectionSuccess);
|
356
|
|
- this.connection.addEventListener(JitsiMeetJS.events.connection.CONNECTION_FAILED, this._onConnectionFailed);
|
357
|
|
- this.connection.addEventListener(JitsiMeetJS.events.connection.CONNECTION_DISCONNECTED, this._disconnect);
|
358
|
|
- this.connection.connect();
|
359
|
|
- }
|
360
|
|
-
|
361
|
|
- /**
|
362
|
|
- * That function is called when connection is established successfully
|
363
|
|
- */
|
364
|
|
- onConnectionSuccess() {
|
365
|
|
- this.room = this.connection.initJitsiConference(roomName.toLowerCase(), config);
|
366
|
|
- this.room.on(JitsiMeetJS.events.conference.STARTED_MUTED, this.onStartMuted.bind(this));
|
367
|
|
- this.room.on(JitsiMeetJS.events.conference.TRACK_ADDED, this.onRemoteTrack.bind(this));
|
368
|
|
- this.room.on(JitsiMeetJS.events.conference.CONFERENCE_JOINED, this.onConferenceJoined.bind(this));
|
369
|
|
- this.room.on(JitsiMeetJS.events.conference.CONNECTION_ESTABLISHED, this.onConnectionEstablished.bind(this));
|
370
|
|
- this.room.on(JitsiMeetJS.events.conference.USER_JOINED, this.onUserJoined.bind(this));
|
371
|
|
- this.room.on(JitsiMeetJS.events.conference.USER_LEFT, this.onUserLeft.bind(this));
|
372
|
|
- this.room.on(JitsiMeetJS.events.conference.PRIVATE_MESSAGE_RECEIVED, this.onPrivateMessage.bind(this));
|
373
|
|
- if (stageView) {
|
374
|
|
- this.room.on(JitsiMeetJS.events.conference.DOMINANT_SPEAKER_CHANGED, this.onDominantSpeakerChanged.bind(this));
|
375
|
|
- }
|
376
|
|
-
|
377
|
|
- const devices = [];
|
378
|
|
-
|
379
|
|
- if (localVideo) {
|
380
|
|
- devices.push('video');
|
381
|
|
- }
|
382
|
|
-
|
383
|
|
- // we always create audio local tracks
|
384
|
|
- devices.push('audio');
|
385
|
|
-
|
386
|
|
- if (devices.length > 0) {
|
387
|
|
- JitsiMeetJS.createLocalTracks({ devices })
|
388
|
|
- .then(this.onLocalTracks.bind(this))
|
389
|
|
- .then(() => {
|
390
|
|
- this.room.join();
|
391
|
|
- })
|
392
|
|
- .catch(error => {
|
393
|
|
- throw error;
|
394
|
|
- });
|
395
|
|
- } else {
|
396
|
|
- this.room.join();
|
397
|
|
- }
|
398
|
|
-
|
399
|
|
- this.updateMaxFrameHeight();
|
400
|
|
- }
|
401
|
|
-
|
402
|
|
- /**
|
403
|
|
- * This function is called when the connection fail.
|
404
|
|
- */
|
405
|
|
- onConnectionFailed() {
|
406
|
|
- console.error(`Participant ${this.id}: Connection Failed!`);
|
407
|
|
- }
|
408
|
|
-
|
409
|
|
- /**
|
410
|
|
- * This function is called when we disconnect.
|
411
|
|
- */
|
412
|
|
- disconnect() {
|
413
|
|
- console.log('disconnect!');
|
414
|
|
- this.connection.removeEventListener(
|
415
|
|
- JitsiMeetJS.events.connection.CONNECTION_ESTABLISHED,
|
416
|
|
- this._onConnectionSuccess);
|
417
|
|
- this.connection.removeEventListener(
|
418
|
|
- JitsiMeetJS.events.connection.CONNECTION_FAILED,
|
419
|
|
- this._onConnectionFailed);
|
420
|
|
- this.connection.removeEventListener(
|
421
|
|
- JitsiMeetJS.events.connection.CONNECTION_DISCONNECTED,
|
422
|
|
- this._disconnect);
|
423
|
|
- }
|
424
|
|
-}
|
425
|
|
-
|
426
|
|
-
|
427
|
|
-let clients = [];
|
428
|
|
-
|
429
|
|
-window.APP = {
|
430
|
|
- conference: {
|
431
|
|
- getStats() {
|
432
|
|
- return clients[0]?.room?.connectionQuality.getStats();
|
433
|
|
- },
|
434
|
|
- getConnectionState() {
|
435
|
|
- return clients[0] && clients[0].room && room.getConnectionState();
|
436
|
|
- },
|
437
|
|
- muteAudio(mute) {
|
438
|
|
- localAudio = mute;
|
439
|
|
- for (let j = 0; j < clients.length; j++) {
|
440
|
|
- for (let i = 0; i < clients[j].localTracks.length; i++) {
|
441
|
|
- if (clients[j].localTracks[i].getType() === 'audio') {
|
442
|
|
- if (mute) {
|
443
|
|
- clients[j].localTracks[i].mute();
|
444
|
|
- }
|
445
|
|
- else {
|
446
|
|
- clients[j].localTracks[i].unmute();
|
447
|
|
-
|
448
|
|
- // if track was not added we need to add it to the peerconnection
|
449
|
|
- if (!clients[j].room.getLocalAudioTrack()) {
|
450
|
|
- clients[j].room.replaceTrack(null, clients[j].localTracks[i]);
|
451
|
|
- }
|
452
|
|
- }
|
453
|
|
- }
|
454
|
|
- }
|
455
|
|
- }
|
456
|
|
- }
|
457
|
|
- },
|
458
|
|
-
|
459
|
|
- get room() {
|
460
|
|
- return clients[0]?.room;
|
461
|
|
- },
|
462
|
|
- get connection() {
|
463
|
|
- return clients[0]?.connection;
|
464
|
|
- },
|
465
|
|
- get numParticipants() {
|
466
|
|
- return clients[0]?.remoteParticipants;
|
467
|
|
- },
|
468
|
|
- get localTracks() {
|
469
|
|
- return clients[0]?.localTracks;
|
470
|
|
- },
|
471
|
|
- get remoteTracks() {
|
472
|
|
- return clients[0]?.remoteTracks;
|
473
|
|
- },
|
474
|
|
- get params() {
|
475
|
|
- return {
|
476
|
|
- roomName,
|
477
|
|
- localAudio,
|
478
|
|
- localVideo,
|
479
|
|
- remoteVideo,
|
480
|
|
- remoteAudio,
|
481
|
|
- autoPlayVideo,
|
482
|
|
- stageView
|
483
|
|
- };
|
484
|
|
- }
|
485
|
|
-};
|
486
|
|
-
|
487
|
|
-/**
|
488
|
|
- *
|
489
|
|
- */
|
490
|
|
-function unload() {
|
491
|
|
- for (let j = 0; j < clients.length; j++) {
|
492
|
|
- for (let i = 0; i < clients[j].localTracks.length; i++) {
|
493
|
|
- clients[j].localTracks[i].dispose();
|
494
|
|
- }
|
495
|
|
- clients[j].room.leave();
|
496
|
|
- clients[j].connection.disconnect();
|
497
|
|
- }
|
498
|
|
- clients = [];
|
499
|
|
-}
|
500
|
|
-
|
501
|
|
-$(window).bind('beforeunload', unload);
|
502
|
|
-$(window).bind('unload', unload);
|
503
|
|
-
|
504
|
|
-JitsiMeetJS.setLogLevel(JitsiMeetJS.logLevels.ERROR);
|
505
|
|
-
|
506
|
|
-JitsiMeetJS.init(config);
|
507
|
|
-
|
508
|
|
-config.serviceUrl = config.bosh = `${config.websocket || config.bosh}?room=${roomName.toLowerCase()}`;
|
509
|
|
-if (config.websocketKeepAliveUrl) {
|
510
|
|
- config.websocketKeepAliveUrl += `?room=${roomName.toLowerCase()}`;
|
511
|
|
-}
|
512
|
|
-
|
513
|
|
-function startClient(i) {
|
514
|
|
- clients[i] = new LoadTestClient(i);
|
515
|
|
- clients[i].connect();
|
516
|
|
- if (i + 1 < numClients) {
|
517
|
|
- setTimeout(() => { startClient(i+1) }, clientInterval)
|
518
|
|
- }
|
519
|
|
-}
|
520
|
|
-
|
521
|
|
-if (numClients > 0) {
|
522
|
|
- startClient(0)
|
523
|
|
-}
|