@doordeck/doordeck-headless-sdk 0.193.0 → 0.195.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kotlin/Kermit-kermit-core.js +64 -64
- package/kotlin/Kermit-kermit.js +8 -8
- package/kotlin/MultiplatformSettings-multiplatform-settings.js +23 -23
- package/kotlin/doordeck-sdk.d.ts +22 -22
- package/kotlin/doordeck-sdk.js +10911 -10922
- package/kotlin/kotlin-kotlin-stdlib.js +2281 -1824
- package/kotlin/kotlinx-atomicfu.js +21 -21
- package/kotlin/kotlinx-browser.js +10 -0
- package/kotlin/kotlinx-coroutines-core.js +2904 -2424
- package/kotlin/kotlinx-io-kotlinx-io-bytestring.js +56 -56
- package/kotlin/kotlinx-io-kotlinx-io-core.js +651 -651
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +2063 -2073
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +1619 -1618
- package/kotlin/ktor-ktor-client-auth.js +421 -412
- package/kotlin/ktor-ktor-client-content-negotiation.js +189 -190
- package/kotlin/ktor-ktor-client-core.js +3050 -2383
- package/kotlin/ktor-ktor-client-logging.js +1055 -1018
- package/kotlin/ktor-ktor-events.js +16 -16
- package/kotlin/ktor-ktor-http-cio.js +446 -451
- package/kotlin/ktor-ktor-http.js +1000 -956
- package/kotlin/ktor-ktor-io.js +1070 -1001
- package/kotlin/ktor-ktor-serialization-kotlinx-json.js +8 -8
- package/kotlin/ktor-ktor-serialization-kotlinx.js +175 -174
- package/kotlin/ktor-ktor-serialization.js +78 -80
- package/kotlin/ktor-ktor-utils.js +981 -1041
- package/kotlin/ktor-ktor-websockets.js +2179 -85
- package/package.json +3 -3
|
@@ -1,42 +1,146 @@
|
|
|
1
|
-
(function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_io_ktor_ktor_io, kotlin_org_jetbrains_kotlinx_kotlinx_io_core) {
|
|
1
|
+
(function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_io_ktor_ktor_utils, kotlin_io_ktor_ktor_io, kotlin_org_jetbrains_kotlinx_kotlinx_io_core, kotlin_org_jetbrains_kotlinx_atomicfu) {
|
|
2
2
|
'use strict';
|
|
3
3
|
//region block: imports
|
|
4
4
|
var imul = Math.imul;
|
|
5
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
6
|
-
var mapCapacity = kotlin_kotlin.$_$.
|
|
7
|
-
var coerceAtLeast = kotlin_kotlin.$_$.
|
|
8
|
-
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.
|
|
9
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
10
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
11
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
12
|
-
var enumEntries = kotlin_kotlin.$_$.
|
|
13
|
-
var
|
|
14
|
-
var
|
|
5
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.x5;
|
|
6
|
+
var mapCapacity = kotlin_kotlin.$_$.p7;
|
|
7
|
+
var coerceAtLeast = kotlin_kotlin.$_$.hc;
|
|
8
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.r1;
|
|
9
|
+
var Unit_instance = kotlin_kotlin.$_$.z;
|
|
10
|
+
var protoOf = kotlin_kotlin.$_$.zb;
|
|
11
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.db;
|
|
12
|
+
var enumEntries = kotlin_kotlin.$_$.n9;
|
|
13
|
+
var objectCreate = kotlin_kotlin.$_$.yb;
|
|
14
|
+
var Enum = kotlin_kotlin.$_$.qf;
|
|
15
|
+
var initMetadataForClass = kotlin_kotlin.$_$.cb;
|
|
15
16
|
var VOID = kotlin_kotlin.$_$.b;
|
|
16
|
-
var toString = kotlin_kotlin.$_$.
|
|
17
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
17
|
+
var toString = kotlin_kotlin.$_$.cc;
|
|
18
|
+
var getStringHashCode = kotlin_kotlin.$_$.ab;
|
|
19
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.gb;
|
|
20
|
+
var isInterface = kotlin_kotlin.$_$.rb;
|
|
21
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.n2;
|
|
22
|
+
var Dispatchers_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c;
|
|
23
|
+
var launch = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a2;
|
|
24
|
+
var CoroutineStart_UNDISPATCHED_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.i;
|
|
25
|
+
var ChannelResult = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.u;
|
|
26
|
+
var _ChannelResult___get_isSuccess__impl__odq1z9 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.t;
|
|
27
|
+
var CoroutineImpl = kotlin_kotlin.$_$.l9;
|
|
28
|
+
var THROW_CCE = kotlin_kotlin.$_$.zf;
|
|
29
|
+
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.q1;
|
|
30
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.v8;
|
|
31
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.hb;
|
|
32
|
+
var get_isTraceEnabled = kotlin_io_ktor_ktor_utils.$_$.l;
|
|
33
|
+
var BytePacketBuilder = kotlin_io_ktor_ktor_io.$_$.x;
|
|
34
|
+
var writeFully = kotlin_io_ktor_ktor_io.$_$.g1;
|
|
35
|
+
var ensureNotNull = kotlin_kotlin.$_$.rg;
|
|
36
|
+
var build = kotlin_io_ktor_ktor_io.$_$.y;
|
|
26
37
|
var readByteArray = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.k;
|
|
38
|
+
var cancelConsumed = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.b1;
|
|
39
|
+
var ClosedSendChannelException = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.x;
|
|
40
|
+
var CancellationException_init_$Create$ = kotlin_kotlin.$_$.z1;
|
|
41
|
+
var ChannelIOException = kotlin_io_ktor_ktor_utils.$_$.d;
|
|
42
|
+
var CancellationException = kotlin_kotlin.$_$.u8;
|
|
43
|
+
var ClosedReceiveChannelException = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.w;
|
|
44
|
+
var IOException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.c;
|
|
45
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.eb;
|
|
46
|
+
var toString_0 = kotlin_kotlin.$_$.ch;
|
|
47
|
+
var get_size = kotlin_io_ktor_ktor_io.$_$.d1;
|
|
48
|
+
var fromInt = kotlin_kotlin.$_$.w9;
|
|
49
|
+
var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d;
|
|
50
|
+
var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.l1;
|
|
51
|
+
var Job = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.s1;
|
|
52
|
+
var Key_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e;
|
|
53
|
+
var CoroutineName = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.o1;
|
|
54
|
+
var Factory_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
|
|
55
|
+
var atomic$boolean$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.b;
|
|
56
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.j1;
|
|
57
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.r2;
|
|
58
|
+
var joinToString = kotlin_kotlin.$_$.h7;
|
|
59
|
+
var KtorSimpleLogger = kotlin_io_ktor_ktor_utils.$_$.k;
|
|
60
|
+
var Buffer = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.f;
|
|
61
|
+
var readText = kotlin_io_ktor_ktor_io.$_$.b1;
|
|
62
|
+
var DisposableHandle = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.r1;
|
|
63
|
+
var initMetadataForObject = kotlin_kotlin.$_$.ib;
|
|
64
|
+
var Exception = kotlin_kotlin.$_$.sf;
|
|
65
|
+
var Exception_init_$Init$ = kotlin_kotlin.$_$.g2;
|
|
66
|
+
var captureStack = kotlin_kotlin.$_$.la;
|
|
67
|
+
var initCauseBridge = kotlin_io_ktor_ktor_utils.$_$.j;
|
|
68
|
+
var defineProp = kotlin_kotlin.$_$.ta;
|
|
69
|
+
var CopyableThrowable = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.n1;
|
|
70
|
+
var compareTo = kotlin_kotlin.$_$.sa;
|
|
71
|
+
var Channel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.v;
|
|
72
|
+
var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.a;
|
|
73
|
+
var toByteArray = kotlin_io_ktor_ktor_io.$_$.f1;
|
|
74
|
+
var decodeToString = kotlin_kotlin.$_$.fd;
|
|
75
|
+
var getTimeMillis = kotlin_io_ktor_ktor_utils.$_$.h;
|
|
76
|
+
var Random = kotlin_kotlin.$_$.fc;
|
|
77
|
+
var withTimeoutOrNull = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.p;
|
|
78
|
+
var hex = kotlin_io_ktor_ktor_utils.$_$.i1;
|
|
79
|
+
var ClosedByteChannelException = kotlin_io_ktor_ktor_io.$_$.o1;
|
|
80
|
+
var BufferOverflow_SUSPEND_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
|
|
81
|
+
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.o9;
|
|
82
|
+
var BufferOverflow_DROP_OLDEST_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g;
|
|
83
|
+
var _ChannelResult___get_isClosed__impl__mg7kuu = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.s;
|
|
84
|
+
var close$default = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.r;
|
|
85
|
+
var cancel$default = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.q;
|
|
86
|
+
var SendChannel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a1;
|
|
87
|
+
var ReceiveChannel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.z;
|
|
88
|
+
var RuntimeException = kotlin_kotlin.$_$.yf;
|
|
89
|
+
var RuntimeException_init_$Init$ = kotlin_kotlin.$_$.z2;
|
|
90
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.i1;
|
|
91
|
+
var split = kotlin_kotlin.$_$.ae;
|
|
92
|
+
var first = kotlin_kotlin.$_$.z6;
|
|
93
|
+
var isCharSequence = kotlin_kotlin.$_$.nb;
|
|
94
|
+
var trim = kotlin_kotlin.$_$.df;
|
|
95
|
+
var drop = kotlin_kotlin.$_$.r6;
|
|
96
|
+
var writeText = kotlin_io_ktor_ktor_io.$_$.h1;
|
|
97
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.yg;
|
|
27
98
|
//endregion
|
|
28
99
|
//region block: pre-declaration
|
|
29
100
|
initMetadataForCompanion(Companion);
|
|
30
101
|
initMetadataForClass(Codes, 'Codes', VOID, Enum);
|
|
31
102
|
initMetadataForClass(CloseReason, 'CloseReason');
|
|
32
|
-
|
|
103
|
+
function send(frame, $completion) {
|
|
104
|
+
return this.m3c().u1b(frame, $completion);
|
|
105
|
+
}
|
|
106
|
+
initMetadataForInterface(WebSocketSession, 'WebSocketSession', VOID, VOID, [CoroutineScope], [1, 0]);
|
|
107
|
+
initMetadataForInterface(DefaultWebSocketSession, 'DefaultWebSocketSession', VOID, VOID, [WebSocketSession], [1, 0]);
|
|
33
108
|
initMetadataForCompanion(Companion_0);
|
|
109
|
+
initMetadataForLambda(DefaultWebSocketSessionImpl$start$slambda, CoroutineImpl, VOID, [1]);
|
|
110
|
+
initMetadataForLambda(DefaultWebSocketSessionImpl$runIncomingProcessor$slambda, CoroutineImpl, VOID, [1]);
|
|
111
|
+
initMetadataForLambda(DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda, CoroutineImpl, VOID, [1]);
|
|
112
|
+
initMetadataForLambda(DefaultWebSocketSessionImpl$runOrCancelPinger$slambda, CoroutineImpl, VOID, [1]);
|
|
113
|
+
initMetadataForCoroutine($outgoingProcessorLoopCOROUTINE$, CoroutineImpl);
|
|
114
|
+
initMetadataForCoroutine($sendCloseSequenceCOROUTINE$, CoroutineImpl);
|
|
115
|
+
initMetadataForCoroutine($checkMaxFrameSizeCOROUTINE$, CoroutineImpl);
|
|
116
|
+
initMetadataForClass(DefaultWebSocketSessionImpl, 'DefaultWebSocketSessionImpl', VOID, VOID, [DefaultWebSocketSession, WebSocketSession], [1, 0, 2]);
|
|
117
|
+
initMetadataForObject(NonDisposableHandle, 'NonDisposableHandle', VOID, VOID, [DisposableHandle]);
|
|
118
|
+
initMetadataForClass(FrameTooBigException, 'FrameTooBigException', VOID, Exception, [CopyableThrowable]);
|
|
119
|
+
initMetadataForCompanion(Companion_1);
|
|
34
120
|
initMetadataForClass(FrameType, 'FrameType', VOID, Enum);
|
|
121
|
+
initMetadataForLambda(ponger$slambda, CoroutineImpl, VOID, [1]);
|
|
122
|
+
initMetadataForLambda(pinger$slambda$slambda, CoroutineImpl, VOID, [1]);
|
|
123
|
+
initMetadataForLambda(pinger$slambda$slambda_1, CoroutineImpl, VOID, [1]);
|
|
124
|
+
initMetadataForLambda(pinger$slambda, CoroutineImpl, VOID, [1]);
|
|
125
|
+
initMetadataForCompanion(Companion_2);
|
|
126
|
+
initMetadataForClass(WebSocketChannelsConfig, 'WebSocketChannelsConfig', WebSocketChannelsConfig);
|
|
127
|
+
initMetadataForCompanion(Companion_3);
|
|
128
|
+
initMetadataForClass(ChannelConfig, 'ChannelConfig');
|
|
129
|
+
initMetadataForClass(ChannelOverflow, 'ChannelOverflow', VOID, Enum);
|
|
130
|
+
initMetadataForCompanion(Companion_4);
|
|
131
|
+
initMetadataForClass(BoundedChannel, 'BoundedChannel', VOID, VOID, [SendChannel, ReceiveChannel], [1, 0]);
|
|
132
|
+
initMetadataForClass(ChannelOverflowException, 'ChannelOverflowException', VOID, RuntimeException);
|
|
133
|
+
initMetadataForInterface(WebSocketExtension, 'WebSocketExtension');
|
|
134
|
+
initMetadataForClass(WebSocketExtensionsConfig, 'WebSocketExtensionsConfig', WebSocketExtensionsConfig);
|
|
135
|
+
initMetadataForClass(WebSocketExtensionHeader, 'WebSocketExtensionHeader');
|
|
136
|
+
initMetadataForCoroutine($closeCOROUTINE$, CoroutineImpl);
|
|
35
137
|
initMetadataForClass(Frame, 'Frame');
|
|
36
138
|
initMetadataForClass(Binary, 'Binary', VOID, Frame);
|
|
37
139
|
initMetadataForClass(Text, 'Text', VOID, Frame);
|
|
38
140
|
initMetadataForClass(Close, 'Close', Close_init_$Create$_0, Frame);
|
|
39
|
-
|
|
141
|
+
initMetadataForClass(Ping, 'Ping', VOID, Frame);
|
|
142
|
+
initMetadataForClass(Pong, 'Pong', VOID, Frame);
|
|
143
|
+
initMetadataForCompanion(Companion_5);
|
|
40
144
|
//endregion
|
|
41
145
|
var Codes_NORMAL_instance;
|
|
42
146
|
var Codes_GOING_AWAY_instance;
|
|
@@ -61,14 +165,14 @@
|
|
|
61
165
|
var _iterator__ex2g4s = this_0.t();
|
|
62
166
|
while (_iterator__ex2g4s.u()) {
|
|
63
167
|
var element = _iterator__ex2g4s.v();
|
|
64
|
-
var tmp$ret$
|
|
65
|
-
destination.y2(tmp$ret$
|
|
168
|
+
var tmp$ret$2 = element.b3c_1;
|
|
169
|
+
destination.y2(tmp$ret$2, element);
|
|
66
170
|
}
|
|
67
|
-
tmp.
|
|
68
|
-
this.
|
|
171
|
+
tmp.c3c_1 = destination;
|
|
172
|
+
this.d3c_1 = Codes_INTERNAL_ERROR_getInstance();
|
|
69
173
|
}
|
|
70
|
-
protoOf(Companion).
|
|
71
|
-
return this.
|
|
174
|
+
protoOf(Companion).e3c = function (code) {
|
|
175
|
+
return this.c3c_1.g3(code);
|
|
72
176
|
};
|
|
73
177
|
var Companion_instance;
|
|
74
178
|
function Companion_getInstance() {
|
|
@@ -105,9 +209,16 @@
|
|
|
105
209
|
Companion_getInstance();
|
|
106
210
|
}
|
|
107
211
|
var $ENTRIES;
|
|
212
|
+
function CloseReason_init_$Init$(code, message, $this) {
|
|
213
|
+
CloseReason.call($this, code.b3c_1, message);
|
|
214
|
+
return $this;
|
|
215
|
+
}
|
|
216
|
+
function CloseReason_init_$Create$(code, message) {
|
|
217
|
+
return CloseReason_init_$Init$(code, message, objectCreate(protoOf(CloseReason)));
|
|
218
|
+
}
|
|
108
219
|
function Codes(name, ordinal, code) {
|
|
109
220
|
Enum.call(this, name, ordinal);
|
|
110
|
-
this.
|
|
221
|
+
this.b3c_1 = code;
|
|
111
222
|
}
|
|
112
223
|
function Codes_NORMAL_getInstance() {
|
|
113
224
|
Codes_initEntries();
|
|
@@ -158,19 +269,19 @@
|
|
|
158
269
|
return Codes_TRY_AGAIN_LATER_instance;
|
|
159
270
|
}
|
|
160
271
|
function CloseReason(code, message) {
|
|
161
|
-
this.
|
|
162
|
-
this.
|
|
272
|
+
this.f3c_1 = code;
|
|
273
|
+
this.g3c_1 = message;
|
|
163
274
|
}
|
|
164
|
-
protoOf(CloseReason).
|
|
165
|
-
return Companion_getInstance().
|
|
275
|
+
protoOf(CloseReason).h3c = function () {
|
|
276
|
+
return Companion_getInstance().e3c(this.f3c_1);
|
|
166
277
|
};
|
|
167
278
|
protoOf(CloseReason).toString = function () {
|
|
168
|
-
var tmp0_elvis_lhs = this.
|
|
169
|
-
return 'CloseReason(reason=' + toString(tmp0_elvis_lhs == null ? this.
|
|
279
|
+
var tmp0_elvis_lhs = this.h3c();
|
|
280
|
+
return 'CloseReason(reason=' + toString(tmp0_elvis_lhs == null ? this.f3c_1 : tmp0_elvis_lhs) + ', message=' + this.g3c_1 + ')';
|
|
170
281
|
};
|
|
171
282
|
protoOf(CloseReason).hashCode = function () {
|
|
172
|
-
var result = this.
|
|
173
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
283
|
+
var result = this.f3c_1;
|
|
284
|
+
result = imul(result, 31) + getStringHashCode(this.g3c_1) | 0;
|
|
174
285
|
return result;
|
|
175
286
|
};
|
|
176
287
|
protoOf(CloseReason).equals = function (other) {
|
|
@@ -178,15 +289,1140 @@
|
|
|
178
289
|
return true;
|
|
179
290
|
if (!(other instanceof CloseReason))
|
|
180
291
|
return false;
|
|
181
|
-
if (!(this.
|
|
292
|
+
if (!(this.f3c_1 === other.f3c_1))
|
|
182
293
|
return false;
|
|
183
|
-
if (!(this.
|
|
294
|
+
if (!(this.g3c_1 === other.g3c_1))
|
|
184
295
|
return false;
|
|
185
296
|
return true;
|
|
186
297
|
};
|
|
298
|
+
function get_LOGGER() {
|
|
299
|
+
_init_properties_DefaultWebSocketSession_kt__469s0y();
|
|
300
|
+
return LOGGER;
|
|
301
|
+
}
|
|
302
|
+
var LOGGER;
|
|
303
|
+
function get_IncomingProcessorCoroutineName() {
|
|
304
|
+
_init_properties_DefaultWebSocketSession_kt__469s0y();
|
|
305
|
+
return IncomingProcessorCoroutineName;
|
|
306
|
+
}
|
|
307
|
+
var IncomingProcessorCoroutineName;
|
|
308
|
+
function get_OutgoingProcessorCoroutineName() {
|
|
309
|
+
_init_properties_DefaultWebSocketSession_kt__469s0y();
|
|
310
|
+
return OutgoingProcessorCoroutineName;
|
|
311
|
+
}
|
|
312
|
+
var OutgoingProcessorCoroutineName;
|
|
313
|
+
function get_NORMAL_CLOSE() {
|
|
314
|
+
_init_properties_DefaultWebSocketSession_kt__469s0y();
|
|
315
|
+
return NORMAL_CLOSE;
|
|
316
|
+
}
|
|
317
|
+
var NORMAL_CLOSE;
|
|
318
|
+
var OUTGOING_CHANNEL_CONFIG;
|
|
319
|
+
function DefaultWebSocketSession() {
|
|
320
|
+
}
|
|
321
|
+
function DefaultWebSocketSession_0(session, pingIntervalMillis, timeoutMillis, channelsConfig) {
|
|
322
|
+
pingIntervalMillis = pingIntervalMillis === VOID ? 0n : pingIntervalMillis;
|
|
323
|
+
timeoutMillis = timeoutMillis === VOID ? 15000n : timeoutMillis;
|
|
324
|
+
channelsConfig = channelsConfig === VOID ? Companion_getInstance_2().o3c_1 : channelsConfig;
|
|
325
|
+
_init_properties_DefaultWebSocketSession_kt__469s0y();
|
|
326
|
+
// Inline function 'kotlin.require' call
|
|
327
|
+
if (!!isInterface(session, DefaultWebSocketSession)) {
|
|
328
|
+
var message = 'Cannot wrap other DefaultWebSocketSession';
|
|
329
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
330
|
+
}
|
|
331
|
+
return new DefaultWebSocketSessionImpl(session, pingIntervalMillis, timeoutMillis, channelsConfig.p3c_1, channelsConfig.q3c_1);
|
|
332
|
+
}
|
|
333
|
+
function runIncomingProcessor($this, ponger) {
|
|
334
|
+
var tmp = get_IncomingProcessorCoroutineName().yg(Dispatchers_getInstance().j15_1);
|
|
335
|
+
return launch($this, tmp, VOID, DefaultWebSocketSessionImpl$runIncomingProcessor$slambda_0($this, ponger, null));
|
|
336
|
+
}
|
|
337
|
+
function runOutgoingProcessor($this) {
|
|
338
|
+
var tmp = get_OutgoingProcessorCoroutineName().yg(Dispatchers_getInstance().j15_1);
|
|
339
|
+
var tmp_0 = CoroutineStart_UNDISPATCHED_getInstance();
|
|
340
|
+
return launch($this, tmp, tmp_0, DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda_0($this, null));
|
|
341
|
+
}
|
|
342
|
+
function outgoingProcessorLoop($this, $completion) {
|
|
343
|
+
var tmp = new $outgoingProcessorLoopCOROUTINE$($this, $completion);
|
|
344
|
+
tmp.c9_1 = Unit_instance;
|
|
345
|
+
tmp.d9_1 = null;
|
|
346
|
+
return tmp.i9();
|
|
347
|
+
}
|
|
348
|
+
function sendCloseSequence($this, reason, exception, $completion) {
|
|
349
|
+
exception = exception === VOID ? null : exception;
|
|
350
|
+
var tmp = new $sendCloseSequenceCOROUTINE$($this, reason, exception, $completion);
|
|
351
|
+
tmp.c9_1 = Unit_instance;
|
|
352
|
+
tmp.d9_1 = null;
|
|
353
|
+
return tmp.i9();
|
|
354
|
+
}
|
|
355
|
+
function tryClose($this) {
|
|
356
|
+
return $this.v3d_1.atomicfu$compareAndSet(false, true);
|
|
357
|
+
}
|
|
358
|
+
function runOrCancelPinger($this) {
|
|
359
|
+
var interval = $this.y3d_1;
|
|
360
|
+
var tmp;
|
|
361
|
+
if ($this.v3d_1.kotlinx$atomicfu$value) {
|
|
362
|
+
tmp = null;
|
|
363
|
+
} else if (interval > 0n) {
|
|
364
|
+
var tmp_0 = $this.o3d_1.m3c();
|
|
365
|
+
var tmp_1 = $this.z3d_1;
|
|
366
|
+
tmp = pinger($this, tmp_0, interval, tmp_1, DefaultWebSocketSessionImpl$runOrCancelPinger$slambda_0($this, null));
|
|
367
|
+
} else {
|
|
368
|
+
tmp = null;
|
|
369
|
+
}
|
|
370
|
+
var newPinger = tmp;
|
|
371
|
+
var tmp0_safe_receiver = $this.p3d_1.atomicfu$getAndSet(newPinger);
|
|
372
|
+
if (tmp0_safe_receiver == null)
|
|
373
|
+
null;
|
|
374
|
+
else
|
|
375
|
+
tmp0_safe_receiver.c1c();
|
|
376
|
+
var tmp2_safe_receiver = newPinger == null ? null : new ChannelResult(newPinger.v1b(Companion_getInstance_0().b3e_1));
|
|
377
|
+
if (tmp2_safe_receiver == null)
|
|
378
|
+
null;
|
|
379
|
+
else
|
|
380
|
+
_ChannelResult___get_isSuccess__impl__odq1z9(tmp2_safe_receiver.f1a_1);
|
|
381
|
+
if ($this.v3d_1.kotlinx$atomicfu$value && !(newPinger == null)) {
|
|
382
|
+
runOrCancelPinger($this);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
function checkMaxFrameSize($this, packet, frame, $completion) {
|
|
386
|
+
var tmp = new $checkMaxFrameSizeCOROUTINE$($this, packet, frame, $completion);
|
|
387
|
+
tmp.c9_1 = Unit_instance;
|
|
388
|
+
tmp.d9_1 = null;
|
|
389
|
+
return tmp.i9();
|
|
390
|
+
}
|
|
391
|
+
function processIncomingExtensions($this, frame) {
|
|
392
|
+
// Inline function 'kotlin.collections.fold' call
|
|
393
|
+
var accumulator = frame;
|
|
394
|
+
var _iterator__ex2g4s = $this.o3e().t();
|
|
395
|
+
while (_iterator__ex2g4s.u()) {
|
|
396
|
+
var element = _iterator__ex2g4s.v();
|
|
397
|
+
var current = accumulator;
|
|
398
|
+
accumulator = element.p3e(current);
|
|
399
|
+
}
|
|
400
|
+
return accumulator;
|
|
401
|
+
}
|
|
402
|
+
function processOutgoingExtensions($this, frame) {
|
|
403
|
+
// Inline function 'kotlin.collections.fold' call
|
|
404
|
+
var accumulator = frame;
|
|
405
|
+
var _iterator__ex2g4s = $this.o3e().t();
|
|
406
|
+
while (_iterator__ex2g4s.u()) {
|
|
407
|
+
var element = _iterator__ex2g4s.v();
|
|
408
|
+
var current = accumulator;
|
|
409
|
+
accumulator = element.q3e(current);
|
|
410
|
+
}
|
|
411
|
+
return accumulator;
|
|
412
|
+
}
|
|
413
|
+
function Companion_0() {
|
|
414
|
+
Companion_instance_0 = this;
|
|
415
|
+
this.b3e_1 = new Pong(new Int8Array(0), NonDisposableHandle_instance);
|
|
416
|
+
}
|
|
417
|
+
var Companion_instance_0;
|
|
418
|
+
function Companion_getInstance_0() {
|
|
419
|
+
if (Companion_instance_0 == null)
|
|
420
|
+
new Companion_0();
|
|
421
|
+
return Companion_instance_0;
|
|
422
|
+
}
|
|
423
|
+
function DefaultWebSocketSessionImpl$start$slambda($incomingJob, $outgoingJob, this$0, resultContinuation) {
|
|
424
|
+
this.z3e_1 = $incomingJob;
|
|
425
|
+
this.a3f_1 = $outgoingJob;
|
|
426
|
+
this.b3f_1 = this$0;
|
|
427
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
428
|
+
}
|
|
429
|
+
protoOf(DefaultWebSocketSessionImpl$start$slambda).x1w = function ($this$launch, $completion) {
|
|
430
|
+
var tmp = this.y1w($this$launch, $completion);
|
|
431
|
+
tmp.c9_1 = Unit_instance;
|
|
432
|
+
tmp.d9_1 = null;
|
|
433
|
+
return tmp.i9();
|
|
434
|
+
};
|
|
435
|
+
protoOf(DefaultWebSocketSessionImpl$start$slambda).u9 = function (p1, $completion) {
|
|
436
|
+
return this.x1w((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
437
|
+
};
|
|
438
|
+
protoOf(DefaultWebSocketSessionImpl$start$slambda).i9 = function () {
|
|
439
|
+
var suspendResult = this.c9_1;
|
|
440
|
+
$sm: do
|
|
441
|
+
try {
|
|
442
|
+
var tmp = this.a9_1;
|
|
443
|
+
switch (tmp) {
|
|
444
|
+
case 0:
|
|
445
|
+
this.b9_1 = 3;
|
|
446
|
+
this.a9_1 = 1;
|
|
447
|
+
suspendResult = this.z3e_1.yt(this);
|
|
448
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
449
|
+
return suspendResult;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
continue $sm;
|
|
453
|
+
case 1:
|
|
454
|
+
this.a9_1 = 2;
|
|
455
|
+
suspendResult = this.a3f_1.yt(this);
|
|
456
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
457
|
+
return suspendResult;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
continue $sm;
|
|
461
|
+
case 2:
|
|
462
|
+
this.b3f_1.r3d_1.cu();
|
|
463
|
+
return Unit_instance;
|
|
464
|
+
case 3:
|
|
465
|
+
throw this.d9_1;
|
|
466
|
+
}
|
|
467
|
+
} catch ($p) {
|
|
468
|
+
var e = $p;
|
|
469
|
+
if (this.b9_1 === 3) {
|
|
470
|
+
throw e;
|
|
471
|
+
} else {
|
|
472
|
+
this.a9_1 = this.b9_1;
|
|
473
|
+
this.d9_1 = e;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
while (true);
|
|
477
|
+
};
|
|
478
|
+
protoOf(DefaultWebSocketSessionImpl$start$slambda).y1w = function ($this$launch, completion) {
|
|
479
|
+
var i = new DefaultWebSocketSessionImpl$start$slambda(this.z3e_1, this.a3f_1, this.b3f_1, completion);
|
|
480
|
+
i.c3f_1 = $this$launch;
|
|
481
|
+
return i;
|
|
482
|
+
};
|
|
483
|
+
function DefaultWebSocketSessionImpl$start$slambda_0($incomingJob, $outgoingJob, this$0, resultContinuation) {
|
|
484
|
+
var i = new DefaultWebSocketSessionImpl$start$slambda($incomingJob, $outgoingJob, this$0, resultContinuation);
|
|
485
|
+
var l = function ($this$launch, $completion) {
|
|
486
|
+
return i.x1w($this$launch, $completion);
|
|
487
|
+
};
|
|
488
|
+
l.$arity = 1;
|
|
489
|
+
return l;
|
|
490
|
+
}
|
|
491
|
+
function DefaultWebSocketSessionImpl$runIncomingProcessor$slambda(this$0, $ponger, resultContinuation) {
|
|
492
|
+
this.l3f_1 = this$0;
|
|
493
|
+
this.m3f_1 = $ponger;
|
|
494
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
495
|
+
}
|
|
496
|
+
protoOf(DefaultWebSocketSessionImpl$runIncomingProcessor$slambda).x1w = function ($this$launch, $completion) {
|
|
497
|
+
var tmp = this.y1w($this$launch, $completion);
|
|
498
|
+
tmp.c9_1 = Unit_instance;
|
|
499
|
+
tmp.d9_1 = null;
|
|
500
|
+
return tmp.i9();
|
|
501
|
+
};
|
|
502
|
+
protoOf(DefaultWebSocketSessionImpl$runIncomingProcessor$slambda).u9 = function (p1, $completion) {
|
|
503
|
+
return this.x1w((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
504
|
+
};
|
|
505
|
+
protoOf(DefaultWebSocketSessionImpl$runIncomingProcessor$slambda).i9 = function () {
|
|
506
|
+
var suspendResult = this.c9_1;
|
|
507
|
+
$sm: do
|
|
508
|
+
try {
|
|
509
|
+
var tmp = this.a9_1;
|
|
510
|
+
switch (tmp) {
|
|
511
|
+
case 0:
|
|
512
|
+
this.b9_1 = 39;
|
|
513
|
+
this.x3f_1 = null;
|
|
514
|
+
this.q3f_1 = null;
|
|
515
|
+
this.p3f_1 = false;
|
|
516
|
+
this.r3f_1 = Unit_instance;
|
|
517
|
+
this.a9_1 = 1;
|
|
518
|
+
continue $sm;
|
|
519
|
+
case 1:
|
|
520
|
+
this.a9_1 = 2;
|
|
521
|
+
continue $sm;
|
|
522
|
+
case 2:
|
|
523
|
+
this.b9_1 = 33;
|
|
524
|
+
this.b9_1 = 32;
|
|
525
|
+
this.b3g_1 = this.l3f_1.o3d_1.l3c();
|
|
526
|
+
this.a9_1 = 3;
|
|
527
|
+
continue $sm;
|
|
528
|
+
case 3:
|
|
529
|
+
this.u3f_1 = this.b3g_1;
|
|
530
|
+
this.t3f_1 = null;
|
|
531
|
+
this.a9_1 = 4;
|
|
532
|
+
continue $sm;
|
|
533
|
+
case 4:
|
|
534
|
+
this.a9_1 = 5;
|
|
535
|
+
continue $sm;
|
|
536
|
+
case 5:
|
|
537
|
+
this.a9_1 = 6;
|
|
538
|
+
continue $sm;
|
|
539
|
+
case 6:
|
|
540
|
+
this.b9_1 = 29;
|
|
541
|
+
this.b9_1 = 28;
|
|
542
|
+
this.a3g_1 = this.u3f_1.t();
|
|
543
|
+
this.a9_1 = 7;
|
|
544
|
+
continue $sm;
|
|
545
|
+
case 7:
|
|
546
|
+
this.a9_1 = 8;
|
|
547
|
+
suspendResult = this.a3g_1.x19(this);
|
|
548
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
549
|
+
return suspendResult;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
continue $sm;
|
|
553
|
+
case 8:
|
|
554
|
+
if (!suspendResult) {
|
|
555
|
+
this.a9_1 = 26;
|
|
556
|
+
continue $sm;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
var e = this.a3g_1.v();
|
|
560
|
+
this.z3f_1 = e;
|
|
561
|
+
this.a9_1 = 9;
|
|
562
|
+
continue $sm;
|
|
563
|
+
case 9:
|
|
564
|
+
this.y3f_1 = this.z3f_1;
|
|
565
|
+
var this_0 = get_LOGGER();
|
|
566
|
+
if (get_isTraceEnabled(this_0)) {
|
|
567
|
+
this_0.n2s('WebSocketSession(' + toString(this.n3f_1) + ') receiving frame ' + this.y3f_1.toString());
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
var tmp0_subject = this.y3f_1;
|
|
571
|
+
if (tmp0_subject instanceof Close) {
|
|
572
|
+
if (!this.l3f_1.m3c().z19()) {
|
|
573
|
+
this.a9_1 = 18;
|
|
574
|
+
var tmp_0 = this.l3f_1.m3c();
|
|
575
|
+
var tmp1_elvis_lhs = readReason(this.y3f_1);
|
|
576
|
+
suspendResult = tmp_0.u1b(Close_init_$Create$(tmp1_elvis_lhs == null ? get_NORMAL_CLOSE() : tmp1_elvis_lhs), this);
|
|
577
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
578
|
+
return suspendResult;
|
|
579
|
+
}
|
|
580
|
+
continue $sm;
|
|
581
|
+
} else {
|
|
582
|
+
this.a9_1 = 19;
|
|
583
|
+
continue $sm;
|
|
584
|
+
}
|
|
585
|
+
} else {
|
|
586
|
+
if (tmp0_subject instanceof Pong) {
|
|
587
|
+
var tmp2_safe_receiver = this.l3f_1.p3d_1.kotlinx$atomicfu$value;
|
|
588
|
+
if (tmp2_safe_receiver == null) {
|
|
589
|
+
this.w3f_1 = null;
|
|
590
|
+
this.a9_1 = 17;
|
|
591
|
+
continue $sm;
|
|
592
|
+
} else {
|
|
593
|
+
this.a9_1 = 16;
|
|
594
|
+
suspendResult = tmp2_safe_receiver.u1b(this.y3f_1, this);
|
|
595
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
596
|
+
return suspendResult;
|
|
597
|
+
}
|
|
598
|
+
continue $sm;
|
|
599
|
+
}
|
|
600
|
+
} else {
|
|
601
|
+
if (tmp0_subject instanceof Ping) {
|
|
602
|
+
this.a9_1 = 15;
|
|
603
|
+
suspendResult = this.m3f_1.u1b(this.y3f_1, this);
|
|
604
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
605
|
+
return suspendResult;
|
|
606
|
+
}
|
|
607
|
+
continue $sm;
|
|
608
|
+
} else {
|
|
609
|
+
this.a9_1 = 10;
|
|
610
|
+
suspendResult = checkMaxFrameSize(this.l3f_1, this.q3f_1, this.y3f_1, this);
|
|
611
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
612
|
+
return suspendResult;
|
|
613
|
+
}
|
|
614
|
+
continue $sm;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
case 10:
|
|
620
|
+
if (!this.y3f_1.c3g_1) {
|
|
621
|
+
if (this.x3f_1 == null) {
|
|
622
|
+
this.x3f_1 = this.y3f_1;
|
|
623
|
+
}
|
|
624
|
+
if (this.q3f_1 == null) {
|
|
625
|
+
this.q3f_1 = BytePacketBuilder();
|
|
626
|
+
}
|
|
627
|
+
writeFully(this.q3f_1, this.y3f_1.e3g_1);
|
|
628
|
+
this.a9_1 = 21;
|
|
629
|
+
continue $sm;
|
|
630
|
+
} else {
|
|
631
|
+
this.a9_1 = 11;
|
|
632
|
+
continue $sm;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
case 11:
|
|
636
|
+
if (this.x3f_1 == null) {
|
|
637
|
+
this.a9_1 = 14;
|
|
638
|
+
suspendResult = this.l3f_1.t3d_1.u1b(processIncomingExtensions(this.l3f_1, this.y3f_1), this);
|
|
639
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
640
|
+
return suspendResult;
|
|
641
|
+
}
|
|
642
|
+
continue $sm;
|
|
643
|
+
} else {
|
|
644
|
+
this.a9_1 = 12;
|
|
645
|
+
continue $sm;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
case 12:
|
|
649
|
+
writeFully(ensureNotNull(this.q3f_1), this.y3f_1.e3g_1);
|
|
650
|
+
var defragmented = Companion_getInstance_5().k3g(true, this.x3f_1.d3g_1, readByteArray(build(this.q3f_1)), this.x3f_1.g3g_1, this.x3f_1.h3g_1, this.x3f_1.i3g_1);
|
|
651
|
+
this.x3f_1 = null;
|
|
652
|
+
this.a9_1 = 13;
|
|
653
|
+
suspendResult = this.l3f_1.t3d_1.u1b(processIncomingExtensions(this.l3f_1, defragmented), this);
|
|
654
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
655
|
+
return suspendResult;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
continue $sm;
|
|
659
|
+
case 13:
|
|
660
|
+
var tmp_1 = this;
|
|
661
|
+
tmp_1.v3f_1 = Unit_instance;
|
|
662
|
+
this.a9_1 = 20;
|
|
663
|
+
continue $sm;
|
|
664
|
+
case 14:
|
|
665
|
+
this.a9_1 = 21;
|
|
666
|
+
continue $sm;
|
|
667
|
+
case 15:
|
|
668
|
+
var tmp_2 = this;
|
|
669
|
+
tmp_2.v3f_1 = Unit_instance;
|
|
670
|
+
this.a9_1 = 20;
|
|
671
|
+
continue $sm;
|
|
672
|
+
case 16:
|
|
673
|
+
var tmp_3 = this;
|
|
674
|
+
tmp_3.w3f_1 = Unit_instance;
|
|
675
|
+
this.a9_1 = 17;
|
|
676
|
+
continue $sm;
|
|
677
|
+
case 17:
|
|
678
|
+
this.v3f_1 = this.w3f_1;
|
|
679
|
+
this.a9_1 = 20;
|
|
680
|
+
continue $sm;
|
|
681
|
+
case 18:
|
|
682
|
+
this.a9_1 = 19;
|
|
683
|
+
continue $sm;
|
|
684
|
+
case 19:
|
|
685
|
+
this.p3f_1 = true;
|
|
686
|
+
this.a9_1 = 22;
|
|
687
|
+
var tmp_4 = this;
|
|
688
|
+
continue $sm;
|
|
689
|
+
case 20:
|
|
690
|
+
if (false) {
|
|
691
|
+
this.a9_1 = 9;
|
|
692
|
+
continue $sm;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
this.a9_1 = 21;
|
|
696
|
+
continue $sm;
|
|
697
|
+
case 21:
|
|
698
|
+
this.a9_1 = 7;
|
|
699
|
+
continue $sm;
|
|
700
|
+
case 22:
|
|
701
|
+
this.b9_1 = 32;
|
|
702
|
+
cancelConsumed(this.u3f_1, this.t3f_1);
|
|
703
|
+
this.b9_1 = 39;
|
|
704
|
+
this.a9_1 = 23;
|
|
705
|
+
continue $sm;
|
|
706
|
+
case 23:
|
|
707
|
+
this.b9_1 = 39;
|
|
708
|
+
this.m3f_1.c1c();
|
|
709
|
+
var tmp0_safe_receiver = this.q3f_1;
|
|
710
|
+
if (tmp0_safe_receiver == null)
|
|
711
|
+
null;
|
|
712
|
+
else {
|
|
713
|
+
tmp0_safe_receiver.l4();
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
this.l3f_1.t3d_1.c1c();
|
|
717
|
+
if (!this.p3f_1) {
|
|
718
|
+
this.a9_1 = 24;
|
|
719
|
+
suspendResult = close(this.l3f_1, CloseReason_init_$Create$(Codes_CLOSED_ABNORMALLY_getInstance(), 'Connection was closed without close frame'), this);
|
|
720
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
721
|
+
return suspendResult;
|
|
722
|
+
}
|
|
723
|
+
continue $sm;
|
|
724
|
+
} else {
|
|
725
|
+
this.a9_1 = 25;
|
|
726
|
+
continue $sm;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
case 24:
|
|
730
|
+
this.a9_1 = 25;
|
|
731
|
+
continue $sm;
|
|
732
|
+
case 25:
|
|
733
|
+
var tmp_5 = this;
|
|
734
|
+
return Unit_instance;
|
|
735
|
+
case 26:
|
|
736
|
+
this.a9_1 = 27;
|
|
737
|
+
var tmp_6 = this;
|
|
738
|
+
continue $sm;
|
|
739
|
+
case 27:
|
|
740
|
+
this.b9_1 = 32;
|
|
741
|
+
cancelConsumed(this.u3f_1, this.t3f_1);
|
|
742
|
+
this.a9_1 = 31;
|
|
743
|
+
continue $sm;
|
|
744
|
+
case 28:
|
|
745
|
+
this.b9_1 = 29;
|
|
746
|
+
var tmp_7 = this.d9_1;
|
|
747
|
+
if (tmp_7 instanceof Error) {
|
|
748
|
+
var e_0 = this.d9_1;
|
|
749
|
+
var tmp_8 = this;
|
|
750
|
+
this.t3f_1 = e_0;
|
|
751
|
+
throw e_0;
|
|
752
|
+
} else {
|
|
753
|
+
throw this.d9_1;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
case 29:
|
|
757
|
+
this.b9_1 = 32;
|
|
758
|
+
var t = this.d9_1;
|
|
759
|
+
cancelConsumed(this.u3f_1, this.t3f_1);
|
|
760
|
+
throw t;
|
|
761
|
+
case 30:
|
|
762
|
+
this.b9_1 = 32;
|
|
763
|
+
cancelConsumed(this.u3f_1, this.t3f_1);
|
|
764
|
+
if (false) {
|
|
765
|
+
this.a9_1 = 3;
|
|
766
|
+
continue $sm;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
this.a9_1 = 31;
|
|
770
|
+
continue $sm;
|
|
771
|
+
case 31:
|
|
772
|
+
this.r3f_1 = Unit_instance;
|
|
773
|
+
this.b9_1 = 39;
|
|
774
|
+
this.a9_1 = 36;
|
|
775
|
+
continue $sm;
|
|
776
|
+
case 32:
|
|
777
|
+
this.b9_1 = 33;
|
|
778
|
+
var tmp_9 = this.d9_1;
|
|
779
|
+
if (tmp_9 instanceof ClosedSendChannelException) {
|
|
780
|
+
var _unused_var__etf5q3 = this.d9_1;
|
|
781
|
+
var tmp_10 = this;
|
|
782
|
+
tmp_10.r3f_1 = Unit_instance;
|
|
783
|
+
this.b9_1 = 39;
|
|
784
|
+
this.a9_1 = 36;
|
|
785
|
+
continue $sm;
|
|
786
|
+
} else {
|
|
787
|
+
var tmp_11 = this.d9_1;
|
|
788
|
+
if (tmp_11 instanceof Error) {
|
|
789
|
+
var cause = this.d9_1;
|
|
790
|
+
var tmp_12 = this;
|
|
791
|
+
this.m3f_1.c1c();
|
|
792
|
+
tmp_12.r3f_1 = this.l3f_1.t3d_1.a1c(cause);
|
|
793
|
+
this.b9_1 = 39;
|
|
794
|
+
this.a9_1 = 36;
|
|
795
|
+
continue $sm;
|
|
796
|
+
} else {
|
|
797
|
+
throw this.d9_1;
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
case 33:
|
|
802
|
+
this.b9_1 = 39;
|
|
803
|
+
this.s3f_1 = this.d9_1;
|
|
804
|
+
this.m3f_1.c1c();
|
|
805
|
+
var tmp0_safe_receiver_0 = this.q3f_1;
|
|
806
|
+
if (tmp0_safe_receiver_0 == null)
|
|
807
|
+
null;
|
|
808
|
+
else {
|
|
809
|
+
tmp0_safe_receiver_0.l4();
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
this.l3f_1.t3d_1.c1c();
|
|
813
|
+
if (!this.p3f_1) {
|
|
814
|
+
this.a9_1 = 34;
|
|
815
|
+
suspendResult = close(this.l3f_1, CloseReason_init_$Create$(Codes_CLOSED_ABNORMALLY_getInstance(), 'Connection was closed without close frame'), this);
|
|
816
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
817
|
+
return suspendResult;
|
|
818
|
+
}
|
|
819
|
+
continue $sm;
|
|
820
|
+
} else {
|
|
821
|
+
this.a9_1 = 35;
|
|
822
|
+
continue $sm;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
case 34:
|
|
826
|
+
this.a9_1 = 35;
|
|
827
|
+
continue $sm;
|
|
828
|
+
case 35:
|
|
829
|
+
throw this.s3f_1;
|
|
830
|
+
case 36:
|
|
831
|
+
this.o3f_1 = this.r3f_1;
|
|
832
|
+
this.b9_1 = 39;
|
|
833
|
+
this.m3f_1.c1c();
|
|
834
|
+
var tmp0_safe_receiver_1 = this.q3f_1;
|
|
835
|
+
if (tmp0_safe_receiver_1 == null)
|
|
836
|
+
null;
|
|
837
|
+
else {
|
|
838
|
+
tmp0_safe_receiver_1.l4();
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
this.l3f_1.t3d_1.c1c();
|
|
842
|
+
if (!this.p3f_1) {
|
|
843
|
+
this.a9_1 = 37;
|
|
844
|
+
suspendResult = close(this.l3f_1, CloseReason_init_$Create$(Codes_CLOSED_ABNORMALLY_getInstance(), 'Connection was closed without close frame'), this);
|
|
845
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
846
|
+
return suspendResult;
|
|
847
|
+
}
|
|
848
|
+
continue $sm;
|
|
849
|
+
} else {
|
|
850
|
+
this.a9_1 = 38;
|
|
851
|
+
continue $sm;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
case 37:
|
|
855
|
+
this.a9_1 = 38;
|
|
856
|
+
continue $sm;
|
|
857
|
+
case 38:
|
|
858
|
+
return Unit_instance;
|
|
859
|
+
case 39:
|
|
860
|
+
throw this.d9_1;
|
|
861
|
+
}
|
|
862
|
+
} catch ($p) {
|
|
863
|
+
var e_1 = $p;
|
|
864
|
+
if (this.b9_1 === 39) {
|
|
865
|
+
throw e_1;
|
|
866
|
+
} else {
|
|
867
|
+
this.a9_1 = this.b9_1;
|
|
868
|
+
this.d9_1 = e_1;
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
while (true);
|
|
872
|
+
};
|
|
873
|
+
protoOf(DefaultWebSocketSessionImpl$runIncomingProcessor$slambda).y1w = function ($this$launch, completion) {
|
|
874
|
+
var i = new DefaultWebSocketSessionImpl$runIncomingProcessor$slambda(this.l3f_1, this.m3f_1, completion);
|
|
875
|
+
i.n3f_1 = $this$launch;
|
|
876
|
+
return i;
|
|
877
|
+
};
|
|
878
|
+
function DefaultWebSocketSessionImpl$runIncomingProcessor$slambda_0(this$0, $ponger, resultContinuation) {
|
|
879
|
+
var i = new DefaultWebSocketSessionImpl$runIncomingProcessor$slambda(this$0, $ponger, resultContinuation);
|
|
880
|
+
var l = function ($this$launch, $completion) {
|
|
881
|
+
return i.x1w($this$launch, $completion);
|
|
882
|
+
};
|
|
883
|
+
l.$arity = 1;
|
|
884
|
+
return l;
|
|
885
|
+
}
|
|
886
|
+
function DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda(this$0, resultContinuation) {
|
|
887
|
+
this.t3g_1 = this$0;
|
|
888
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
889
|
+
}
|
|
890
|
+
protoOf(DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda).x1w = function ($this$launch, $completion) {
|
|
891
|
+
var tmp = this.y1w($this$launch, $completion);
|
|
892
|
+
tmp.c9_1 = Unit_instance;
|
|
893
|
+
tmp.d9_1 = null;
|
|
894
|
+
return tmp.i9();
|
|
895
|
+
};
|
|
896
|
+
protoOf(DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda).u9 = function (p1, $completion) {
|
|
897
|
+
return this.x1w((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
898
|
+
};
|
|
899
|
+
protoOf(DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda).i9 = function () {
|
|
900
|
+
var suspendResult = this.c9_1;
|
|
901
|
+
$sm: do
|
|
902
|
+
try {
|
|
903
|
+
var tmp = this.a9_1;
|
|
904
|
+
switch (tmp) {
|
|
905
|
+
case 0:
|
|
906
|
+
this.b9_1 = 13;
|
|
907
|
+
this.a9_1 = 1;
|
|
908
|
+
continue $sm;
|
|
909
|
+
case 1:
|
|
910
|
+
this.a9_1 = 2;
|
|
911
|
+
continue $sm;
|
|
912
|
+
case 2:
|
|
913
|
+
this.b9_1 = 9;
|
|
914
|
+
this.b9_1 = 4;
|
|
915
|
+
this.a9_1 = 3;
|
|
916
|
+
suspendResult = outgoingProcessorLoop(this.t3g_1, this);
|
|
917
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
918
|
+
return suspendResult;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
continue $sm;
|
|
922
|
+
case 3:
|
|
923
|
+
this.b9_1 = 13;
|
|
924
|
+
this.a9_1 = 11;
|
|
925
|
+
continue $sm;
|
|
926
|
+
case 4:
|
|
927
|
+
this.b9_1 = 9;
|
|
928
|
+
var tmp_0 = this.d9_1;
|
|
929
|
+
if (tmp_0 instanceof ClosedSendChannelException) {
|
|
930
|
+
var _unused_var__etf5q3 = this.d9_1;
|
|
931
|
+
this.b9_1 = 13;
|
|
932
|
+
this.a9_1 = 11;
|
|
933
|
+
continue $sm;
|
|
934
|
+
} else {
|
|
935
|
+
var tmp_1 = this.d9_1;
|
|
936
|
+
if (tmp_1 instanceof ClosedReceiveChannelException) {
|
|
937
|
+
var _unused_var__etf5q3_0 = this.d9_1;
|
|
938
|
+
this.b9_1 = 13;
|
|
939
|
+
this.a9_1 = 11;
|
|
940
|
+
continue $sm;
|
|
941
|
+
} else {
|
|
942
|
+
var tmp_2 = this.d9_1;
|
|
943
|
+
if (tmp_2 instanceof CancellationException) {
|
|
944
|
+
var _unused_var__etf5q3_1 = this.d9_1;
|
|
945
|
+
this.a9_1 = 5;
|
|
946
|
+
suspendResult = sendCloseSequence(this.t3g_1, CloseReason_init_$Create$(Codes_NORMAL_getInstance(), ''), VOID, this);
|
|
947
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
948
|
+
return suspendResult;
|
|
949
|
+
}
|
|
950
|
+
continue $sm;
|
|
951
|
+
} else {
|
|
952
|
+
var tmp_3 = this.d9_1;
|
|
953
|
+
if (tmp_3 instanceof ChannelIOException) {
|
|
954
|
+
var _unused_var__etf5q3_2 = this.d9_1;
|
|
955
|
+
this.b9_1 = 13;
|
|
956
|
+
this.a9_1 = 11;
|
|
957
|
+
continue $sm;
|
|
958
|
+
} else {
|
|
959
|
+
var tmp_4 = this.d9_1;
|
|
960
|
+
if (tmp_4 instanceof Error) {
|
|
961
|
+
var cause = this.d9_1;
|
|
962
|
+
this.t3g_1.u3d_1.bu(CancellationException_init_$Create$('Failed to send frame', cause));
|
|
963
|
+
this.a9_1 = 6;
|
|
964
|
+
suspendResult = closeExceptionally(this.t3g_1.o3d_1, cause, this);
|
|
965
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
966
|
+
return suspendResult;
|
|
967
|
+
}
|
|
968
|
+
continue $sm;
|
|
969
|
+
} else {
|
|
970
|
+
throw this.d9_1;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
case 5:
|
|
978
|
+
this.b9_1 = 13;
|
|
979
|
+
this.a9_1 = 11;
|
|
980
|
+
continue $sm;
|
|
981
|
+
case 6:
|
|
982
|
+
this.b9_1 = 13;
|
|
983
|
+
this.a9_1 = 7;
|
|
984
|
+
continue $sm;
|
|
985
|
+
case 7:
|
|
986
|
+
this.b9_1 = 13;
|
|
987
|
+
this.t3g_1.u3d_1.e1c();
|
|
988
|
+
this.a9_1 = 8;
|
|
989
|
+
suspendResult = close(this.t3g_1.o3d_1, VOID, this);
|
|
990
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
991
|
+
return suspendResult;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
continue $sm;
|
|
995
|
+
case 8:
|
|
996
|
+
return Unit_instance;
|
|
997
|
+
case 9:
|
|
998
|
+
this.b9_1 = 13;
|
|
999
|
+
this.v3g_1 = this.d9_1;
|
|
1000
|
+
this.t3g_1.u3d_1.e1c();
|
|
1001
|
+
this.a9_1 = 10;
|
|
1002
|
+
suspendResult = close(this.t3g_1.o3d_1, VOID, this);
|
|
1003
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1004
|
+
return suspendResult;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
continue $sm;
|
|
1008
|
+
case 10:
|
|
1009
|
+
throw this.v3g_1;
|
|
1010
|
+
case 11:
|
|
1011
|
+
this.b9_1 = 13;
|
|
1012
|
+
this.t3g_1.u3d_1.e1c();
|
|
1013
|
+
this.a9_1 = 12;
|
|
1014
|
+
suspendResult = close(this.t3g_1.o3d_1, VOID, this);
|
|
1015
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1016
|
+
return suspendResult;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
continue $sm;
|
|
1020
|
+
case 12:
|
|
1021
|
+
return Unit_instance;
|
|
1022
|
+
case 13:
|
|
1023
|
+
throw this.d9_1;
|
|
1024
|
+
}
|
|
1025
|
+
} catch ($p) {
|
|
1026
|
+
var e = $p;
|
|
1027
|
+
if (this.b9_1 === 13) {
|
|
1028
|
+
throw e;
|
|
1029
|
+
} else {
|
|
1030
|
+
this.a9_1 = this.b9_1;
|
|
1031
|
+
this.d9_1 = e;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
while (true);
|
|
1035
|
+
};
|
|
1036
|
+
protoOf(DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda).y1w = function ($this$launch, completion) {
|
|
1037
|
+
var i = new DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda(this.t3g_1, completion);
|
|
1038
|
+
i.u3g_1 = $this$launch;
|
|
1039
|
+
return i;
|
|
1040
|
+
};
|
|
1041
|
+
function DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda_0(this$0, resultContinuation) {
|
|
1042
|
+
var i = new DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda(this$0, resultContinuation);
|
|
1043
|
+
var l = function ($this$launch, $completion) {
|
|
1044
|
+
return i.x1w($this$launch, $completion);
|
|
1045
|
+
};
|
|
1046
|
+
l.$arity = 1;
|
|
1047
|
+
return l;
|
|
1048
|
+
}
|
|
1049
|
+
function DefaultWebSocketSessionImpl$runOrCancelPinger$slambda(this$0, resultContinuation) {
|
|
1050
|
+
this.e3h_1 = this$0;
|
|
1051
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1052
|
+
}
|
|
1053
|
+
protoOf(DefaultWebSocketSessionImpl$runOrCancelPinger$slambda).g3h = function (it, $completion) {
|
|
1054
|
+
var tmp = this.h3h(it, $completion);
|
|
1055
|
+
tmp.c9_1 = Unit_instance;
|
|
1056
|
+
tmp.d9_1 = null;
|
|
1057
|
+
return tmp.i9();
|
|
1058
|
+
};
|
|
1059
|
+
protoOf(DefaultWebSocketSessionImpl$runOrCancelPinger$slambda).u9 = function (p1, $completion) {
|
|
1060
|
+
return this.g3h(p1 instanceof CloseReason ? p1 : THROW_CCE(), $completion);
|
|
1061
|
+
};
|
|
1062
|
+
protoOf(DefaultWebSocketSessionImpl$runOrCancelPinger$slambda).i9 = function () {
|
|
1063
|
+
var suspendResult = this.c9_1;
|
|
1064
|
+
$sm: do
|
|
1065
|
+
try {
|
|
1066
|
+
var tmp = this.a9_1;
|
|
1067
|
+
switch (tmp) {
|
|
1068
|
+
case 0:
|
|
1069
|
+
this.b9_1 = 2;
|
|
1070
|
+
this.a9_1 = 1;
|
|
1071
|
+
suspendResult = sendCloseSequence(this.e3h_1, this.f3h_1, IOException_init_$Create$('Ping timeout'), this);
|
|
1072
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1073
|
+
return suspendResult;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
continue $sm;
|
|
1077
|
+
case 1:
|
|
1078
|
+
return Unit_instance;
|
|
1079
|
+
case 2:
|
|
1080
|
+
throw this.d9_1;
|
|
1081
|
+
}
|
|
1082
|
+
} catch ($p) {
|
|
1083
|
+
var e = $p;
|
|
1084
|
+
if (this.b9_1 === 2) {
|
|
1085
|
+
throw e;
|
|
1086
|
+
} else {
|
|
1087
|
+
this.a9_1 = this.b9_1;
|
|
1088
|
+
this.d9_1 = e;
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
while (true);
|
|
1092
|
+
};
|
|
1093
|
+
protoOf(DefaultWebSocketSessionImpl$runOrCancelPinger$slambda).h3h = function (it, completion) {
|
|
1094
|
+
var i = new DefaultWebSocketSessionImpl$runOrCancelPinger$slambda(this.e3h_1, completion);
|
|
1095
|
+
i.f3h_1 = it;
|
|
1096
|
+
return i;
|
|
1097
|
+
};
|
|
1098
|
+
function DefaultWebSocketSessionImpl$runOrCancelPinger$slambda_0(this$0, resultContinuation) {
|
|
1099
|
+
var i = new DefaultWebSocketSessionImpl$runOrCancelPinger$slambda(this$0, resultContinuation);
|
|
1100
|
+
var l = function (it, $completion) {
|
|
1101
|
+
return i.g3h(it, $completion);
|
|
1102
|
+
};
|
|
1103
|
+
l.$arity = 1;
|
|
1104
|
+
return l;
|
|
1105
|
+
}
|
|
1106
|
+
function $outgoingProcessorLoopCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
1107
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1108
|
+
this.z3c_1 = _this__u8e3s4;
|
|
1109
|
+
}
|
|
1110
|
+
protoOf($outgoingProcessorLoopCOROUTINE$).i9 = function () {
|
|
1111
|
+
var suspendResult = this.c9_1;
|
|
1112
|
+
$sm: do
|
|
1113
|
+
try {
|
|
1114
|
+
var tmp = this.a9_1;
|
|
1115
|
+
switch (tmp) {
|
|
1116
|
+
case 0:
|
|
1117
|
+
this.b9_1 = 7;
|
|
1118
|
+
this.b3d_1 = this.z3c_1.u3d_1.t();
|
|
1119
|
+
this.a9_1 = 1;
|
|
1120
|
+
continue $sm;
|
|
1121
|
+
case 1:
|
|
1122
|
+
this.a9_1 = 2;
|
|
1123
|
+
suspendResult = this.b3d_1.x19(this);
|
|
1124
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1125
|
+
return suspendResult;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
continue $sm;
|
|
1129
|
+
case 2:
|
|
1130
|
+
if (!suspendResult) {
|
|
1131
|
+
this.a9_1 = 6;
|
|
1132
|
+
continue $sm;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
var frame = this.b3d_1.v();
|
|
1136
|
+
var this_0 = get_LOGGER();
|
|
1137
|
+
if (get_isTraceEnabled(this_0)) {
|
|
1138
|
+
this_0.n2s('Sending ' + frame.toString() + ' from session ' + toString(this.z3c_1));
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
if (frame instanceof Close) {
|
|
1142
|
+
this.a9_1 = 3;
|
|
1143
|
+
suspendResult = sendCloseSequence(this.z3c_1, readReason(frame), VOID, this);
|
|
1144
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1145
|
+
return suspendResult;
|
|
1146
|
+
}
|
|
1147
|
+
continue $sm;
|
|
1148
|
+
} else {
|
|
1149
|
+
var tmp_0;
|
|
1150
|
+
if (frame instanceof Text) {
|
|
1151
|
+
tmp_0 = true;
|
|
1152
|
+
} else {
|
|
1153
|
+
tmp_0 = frame instanceof Binary;
|
|
1154
|
+
}
|
|
1155
|
+
if (tmp_0) {
|
|
1156
|
+
this.a3d_1 = processOutgoingExtensions(this.z3c_1, frame);
|
|
1157
|
+
this.a9_1 = 4;
|
|
1158
|
+
continue $sm;
|
|
1159
|
+
} else {
|
|
1160
|
+
this.a3d_1 = frame;
|
|
1161
|
+
this.a9_1 = 4;
|
|
1162
|
+
continue $sm;
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
case 3:
|
|
1167
|
+
this.a9_1 = 6;
|
|
1168
|
+
var tmp_1 = this;
|
|
1169
|
+
continue $sm;
|
|
1170
|
+
case 4:
|
|
1171
|
+
var processedFrame = this.a3d_1;
|
|
1172
|
+
this.a9_1 = 5;
|
|
1173
|
+
suspendResult = this.z3c_1.o3d_1.m3c().u1b(processedFrame, this);
|
|
1174
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1175
|
+
return suspendResult;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
continue $sm;
|
|
1179
|
+
case 5:
|
|
1180
|
+
this.a9_1 = 1;
|
|
1181
|
+
continue $sm;
|
|
1182
|
+
case 6:
|
|
1183
|
+
return Unit_instance;
|
|
1184
|
+
case 7:
|
|
1185
|
+
throw this.d9_1;
|
|
1186
|
+
}
|
|
1187
|
+
} catch ($p) {
|
|
1188
|
+
var e = $p;
|
|
1189
|
+
if (this.b9_1 === 7) {
|
|
1190
|
+
throw e;
|
|
1191
|
+
} else {
|
|
1192
|
+
this.a9_1 = this.b9_1;
|
|
1193
|
+
this.d9_1 = e;
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
while (true);
|
|
1197
|
+
};
|
|
1198
|
+
function $sendCloseSequenceCOROUTINE$(_this__u8e3s4, reason, exception, resultContinuation) {
|
|
1199
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1200
|
+
this.k3d_1 = _this__u8e3s4;
|
|
1201
|
+
this.l3d_1 = reason;
|
|
1202
|
+
this.m3d_1 = exception;
|
|
1203
|
+
}
|
|
1204
|
+
protoOf($sendCloseSequenceCOROUTINE$).i9 = function () {
|
|
1205
|
+
var suspendResult = this.c9_1;
|
|
1206
|
+
$sm: do
|
|
1207
|
+
try {
|
|
1208
|
+
var tmp = this.a9_1;
|
|
1209
|
+
switch (tmp) {
|
|
1210
|
+
case 0:
|
|
1211
|
+
this.b9_1 = 6;
|
|
1212
|
+
if (!tryClose(this.k3d_1))
|
|
1213
|
+
return Unit_instance;
|
|
1214
|
+
var this_0 = get_LOGGER();
|
|
1215
|
+
if (get_isTraceEnabled(this_0)) {
|
|
1216
|
+
this_0.n2s('Sending Close Sequence for session ' + toString(this.k3d_1) + ' with reason ' + toString_0(this.l3d_1) + ' and exception ' + toString_0(this.m3d_1));
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
this.k3d_1.r3d_1.c11();
|
|
1220
|
+
var tmp_0 = this;
|
|
1221
|
+
var tmp0_elvis_lhs = this.l3d_1;
|
|
1222
|
+
tmp_0.n3d_1 = tmp0_elvis_lhs == null ? CloseReason_init_$Create$(Codes_NORMAL_getInstance(), '') : tmp0_elvis_lhs;
|
|
1223
|
+
this.a9_1 = 1;
|
|
1224
|
+
continue $sm;
|
|
1225
|
+
case 1:
|
|
1226
|
+
this.b9_1 = 5;
|
|
1227
|
+
runOrCancelPinger(this.k3d_1);
|
|
1228
|
+
if (!(this.n3d_1.f3c_1 === Codes_CLOSED_ABNORMALLY_getInstance().b3c_1)) {
|
|
1229
|
+
this.a9_1 = 2;
|
|
1230
|
+
suspendResult = this.k3d_1.o3d_1.m3c().u1b(Close_init_$Create$(this.n3d_1), this);
|
|
1231
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1232
|
+
return suspendResult;
|
|
1233
|
+
}
|
|
1234
|
+
continue $sm;
|
|
1235
|
+
} else {
|
|
1236
|
+
this.a9_1 = 3;
|
|
1237
|
+
continue $sm;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
case 2:
|
|
1241
|
+
this.a9_1 = 3;
|
|
1242
|
+
continue $sm;
|
|
1243
|
+
case 3:
|
|
1244
|
+
this.b9_1 = 6;
|
|
1245
|
+
this.a9_1 = 4;
|
|
1246
|
+
continue $sm;
|
|
1247
|
+
case 4:
|
|
1248
|
+
this.b9_1 = 6;
|
|
1249
|
+
this.k3d_1.q3d_1.a11(this.n3d_1);
|
|
1250
|
+
if (!(this.m3d_1 == null)) {
|
|
1251
|
+
this.k3d_1.u3d_1.a1c(this.m3d_1);
|
|
1252
|
+
this.k3d_1.t3d_1.a1c(this.m3d_1);
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
return Unit_instance;
|
|
1256
|
+
case 5:
|
|
1257
|
+
this.b9_1 = 6;
|
|
1258
|
+
var t = this.d9_1;
|
|
1259
|
+
this.k3d_1.q3d_1.a11(this.n3d_1);
|
|
1260
|
+
if (!(this.m3d_1 == null)) {
|
|
1261
|
+
this.k3d_1.u3d_1.a1c(this.m3d_1);
|
|
1262
|
+
this.k3d_1.t3d_1.a1c(this.m3d_1);
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
throw t;
|
|
1266
|
+
case 6:
|
|
1267
|
+
throw this.d9_1;
|
|
1268
|
+
}
|
|
1269
|
+
} catch ($p) {
|
|
1270
|
+
var e = $p;
|
|
1271
|
+
if (this.b9_1 === 6) {
|
|
1272
|
+
throw e;
|
|
1273
|
+
} else {
|
|
1274
|
+
this.a9_1 = this.b9_1;
|
|
1275
|
+
this.d9_1 = e;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
while (true);
|
|
1279
|
+
};
|
|
1280
|
+
function $checkMaxFrameSizeCOROUTINE$(_this__u8e3s4, packet, frame, resultContinuation) {
|
|
1281
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1282
|
+
this.k3e_1 = _this__u8e3s4;
|
|
1283
|
+
this.l3e_1 = packet;
|
|
1284
|
+
this.m3e_1 = frame;
|
|
1285
|
+
}
|
|
1286
|
+
protoOf($checkMaxFrameSizeCOROUTINE$).i9 = function () {
|
|
1287
|
+
var suspendResult = this.c9_1;
|
|
1288
|
+
$sm: do
|
|
1289
|
+
try {
|
|
1290
|
+
var tmp = this.a9_1;
|
|
1291
|
+
switch (tmp) {
|
|
1292
|
+
case 0:
|
|
1293
|
+
this.b9_1 = 3;
|
|
1294
|
+
var tmp_0 = this;
|
|
1295
|
+
var tmp_1 = this.m3e_1.e3g_1.length;
|
|
1296
|
+
var tmp0_safe_receiver = this.l3e_1;
|
|
1297
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_size(tmp0_safe_receiver);
|
|
1298
|
+
tmp_0.n3e_1 = tmp_1 + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;
|
|
1299
|
+
if (fromInt(this.n3e_1) > this.k3e_1.k3c()) {
|
|
1300
|
+
var tmp2_safe_receiver = this.l3e_1;
|
|
1301
|
+
if (tmp2_safe_receiver == null)
|
|
1302
|
+
null;
|
|
1303
|
+
else {
|
|
1304
|
+
tmp2_safe_receiver.l4();
|
|
1305
|
+
}
|
|
1306
|
+
this.a9_1 = 2;
|
|
1307
|
+
suspendResult = close(this.k3e_1, CloseReason_init_$Create$(Codes_TOO_BIG_getInstance(), 'Frame is too big: ' + this.n3e_1 + '. Max size is ' + this.k3e_1.k3c().toString()), this);
|
|
1308
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1309
|
+
return suspendResult;
|
|
1310
|
+
}
|
|
1311
|
+
continue $sm;
|
|
1312
|
+
} else {
|
|
1313
|
+
this.a9_1 = 1;
|
|
1314
|
+
continue $sm;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
case 1:
|
|
1318
|
+
return Unit_instance;
|
|
1319
|
+
case 2:
|
|
1320
|
+
throw new FrameTooBigException(fromInt(this.n3e_1));
|
|
1321
|
+
case 3:
|
|
1322
|
+
throw this.d9_1;
|
|
1323
|
+
}
|
|
1324
|
+
} catch ($p) {
|
|
1325
|
+
var e = $p;
|
|
1326
|
+
if (this.b9_1 === 3) {
|
|
1327
|
+
throw e;
|
|
1328
|
+
} else {
|
|
1329
|
+
this.a9_1 = this.b9_1;
|
|
1330
|
+
this.d9_1 = e;
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
while (true);
|
|
1334
|
+
};
|
|
1335
|
+
function DefaultWebSocketSessionImpl(raw, pingIntervalMillis, timeoutMillis, incomingFramesConfig, outgoingFramesConfig) {
|
|
1336
|
+
Companion_getInstance_0();
|
|
1337
|
+
this.o3d_1 = raw;
|
|
1338
|
+
this.p3d_1 = atomic$ref$1(null);
|
|
1339
|
+
this.q3d_1 = CompletableDeferred();
|
|
1340
|
+
this.r3d_1 = Job();
|
|
1341
|
+
this.s3d_1 = this.o3d_1.ss().wg(Key_instance).yg(this.r3d_1).yg(new CoroutineName('ws-default'));
|
|
1342
|
+
this.t3d_1 = from(Factory_getInstance(), incomingFramesConfig);
|
|
1343
|
+
this.u3d_1 = from(Factory_getInstance(), outgoingFramesConfig);
|
|
1344
|
+
this.v3d_1 = atomic$boolean$1(false);
|
|
1345
|
+
var tmp = this;
|
|
1346
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1347
|
+
tmp.w3d_1 = ArrayList_init_$Create$();
|
|
1348
|
+
this.x3d_1 = atomic$boolean$1(false);
|
|
1349
|
+
this.y3d_1 = pingIntervalMillis;
|
|
1350
|
+
this.z3d_1 = timeoutMillis;
|
|
1351
|
+
this.a3e_1 = this.q3d_1;
|
|
1352
|
+
}
|
|
1353
|
+
protoOf(DefaultWebSocketSessionImpl).ss = function () {
|
|
1354
|
+
return this.s3d_1;
|
|
1355
|
+
};
|
|
1356
|
+
protoOf(DefaultWebSocketSessionImpl).l3c = function () {
|
|
1357
|
+
return this.t3d_1;
|
|
1358
|
+
};
|
|
1359
|
+
protoOf(DefaultWebSocketSessionImpl).m3c = function () {
|
|
1360
|
+
return this.u3d_1;
|
|
1361
|
+
};
|
|
1362
|
+
protoOf(DefaultWebSocketSessionImpl).o3e = function () {
|
|
1363
|
+
return this.w3d_1;
|
|
1364
|
+
};
|
|
1365
|
+
protoOf(DefaultWebSocketSessionImpl).j3c = function (value) {
|
|
1366
|
+
this.o3d_1.j3c(value);
|
|
1367
|
+
};
|
|
1368
|
+
protoOf(DefaultWebSocketSessionImpl).k3c = function () {
|
|
1369
|
+
return this.o3d_1.k3c();
|
|
1370
|
+
};
|
|
1371
|
+
protoOf(DefaultWebSocketSessionImpl).i3c = function (negotiatedExtensions) {
|
|
1372
|
+
if (!this.x3d_1.atomicfu$compareAndSet(false, true)) {
|
|
1373
|
+
// Inline function 'kotlin.error' call
|
|
1374
|
+
var message = 'WebSocket session ' + toString(this) + ' is already started.';
|
|
1375
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
1376
|
+
}
|
|
1377
|
+
// Inline function 'io.ktor.util.logging.trace' call
|
|
1378
|
+
var this_0 = get_LOGGER();
|
|
1379
|
+
if (get_isTraceEnabled(this_0)) {
|
|
1380
|
+
var tmp$ret$2 = 'Starting default WebSocketSession(' + toString(this) + ') ' + ('with negotiated extensions: ' + joinToString(negotiatedExtensions));
|
|
1381
|
+
this_0.n2s(tmp$ret$2);
|
|
1382
|
+
}
|
|
1383
|
+
this.w3d_1.n1(negotiatedExtensions);
|
|
1384
|
+
runOrCancelPinger(this);
|
|
1385
|
+
var incomingJob = runIncomingProcessor(this, ponger(this, this.m3c()));
|
|
1386
|
+
var outgoingJob = runOutgoingProcessor(this);
|
|
1387
|
+
launch(this, VOID, VOID, DefaultWebSocketSessionImpl$start$slambda_0(incomingJob, outgoingJob, this, null));
|
|
1388
|
+
};
|
|
1389
|
+
protoOf(DefaultWebSocketSessionImpl).r1n = function ($completion) {
|
|
1390
|
+
return this.o3d_1.r1n($completion);
|
|
1391
|
+
};
|
|
1392
|
+
var properties_initialized_DefaultWebSocketSession_kt_6cjlhc;
|
|
1393
|
+
function _init_properties_DefaultWebSocketSession_kt__469s0y() {
|
|
1394
|
+
if (!properties_initialized_DefaultWebSocketSession_kt_6cjlhc) {
|
|
1395
|
+
properties_initialized_DefaultWebSocketSession_kt_6cjlhc = true;
|
|
1396
|
+
LOGGER = KtorSimpleLogger('io.ktor.websocket.WebSocket');
|
|
1397
|
+
IncomingProcessorCoroutineName = new CoroutineName('ws-incoming-processor');
|
|
1398
|
+
OutgoingProcessorCoroutineName = new CoroutineName('ws-outgoing-processor');
|
|
1399
|
+
NORMAL_CLOSE = CloseReason_init_$Create$(Codes_NORMAL_getInstance(), 'OK');
|
|
1400
|
+
var tmp0_safe_receiver = get_OUTGOING_CHANNEL_CAPACITY();
|
|
1401
|
+
var tmp;
|
|
1402
|
+
if (tmp0_safe_receiver == null) {
|
|
1403
|
+
tmp = null;
|
|
1404
|
+
} else {
|
|
1405
|
+
// Inline function 'kotlin.let' call
|
|
1406
|
+
tmp = new ChannelConfig(tmp0_safe_receiver, ChannelOverflow_SUSPEND_getInstance());
|
|
1407
|
+
}
|
|
1408
|
+
OUTGOING_CHANNEL_CONFIG = tmp;
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
function readReason(_this__u8e3s4) {
|
|
1412
|
+
if (_this__u8e3s4.e3g_1.length < 2) {
|
|
1413
|
+
return null;
|
|
1414
|
+
}
|
|
1415
|
+
// Inline function 'io.ktor.utils.io.core.buildPacket' call
|
|
1416
|
+
var builder = new Buffer();
|
|
1417
|
+
writeFully(builder, _this__u8e3s4.e3g_1);
|
|
1418
|
+
var packet = builder;
|
|
1419
|
+
var code = packet.up();
|
|
1420
|
+
var message = readText(packet);
|
|
1421
|
+
return new CloseReason(code, message);
|
|
1422
|
+
}
|
|
187
1423
|
function NonDisposableHandle() {
|
|
188
1424
|
}
|
|
189
|
-
protoOf(NonDisposableHandle).
|
|
1425
|
+
protoOf(NonDisposableHandle).qv = function () {
|
|
190
1426
|
return Unit_instance;
|
|
191
1427
|
};
|
|
192
1428
|
protoOf(NonDisposableHandle).toString = function () {
|
|
@@ -206,13 +1442,28 @@
|
|
|
206
1442
|
function NonDisposableHandle_getInstance() {
|
|
207
1443
|
return NonDisposableHandle_instance;
|
|
208
1444
|
}
|
|
1445
|
+
function FrameTooBigException(frameSize) {
|
|
1446
|
+
Exception_init_$Init$(this);
|
|
1447
|
+
captureStack(this, FrameTooBigException);
|
|
1448
|
+
this.i3h_1 = frameSize;
|
|
1449
|
+
delete this.message;
|
|
1450
|
+
}
|
|
1451
|
+
protoOf(FrameTooBigException).e = function () {
|
|
1452
|
+
return 'Frame is too big: ' + this.i3h_1.toString();
|
|
1453
|
+
};
|
|
1454
|
+
protoOf(FrameTooBigException).l11 = function () {
|
|
1455
|
+
// Inline function 'kotlin.also' call
|
|
1456
|
+
var this_0 = new FrameTooBigException(this.i3h_1);
|
|
1457
|
+
initCauseBridge(this_0, this);
|
|
1458
|
+
return this_0;
|
|
1459
|
+
};
|
|
209
1460
|
var FrameType_TEXT_instance;
|
|
210
1461
|
var FrameType_BINARY_instance;
|
|
211
1462
|
var FrameType_CLOSE_instance;
|
|
212
1463
|
var FrameType_PING_instance;
|
|
213
1464
|
var FrameType_PONG_instance;
|
|
214
|
-
function
|
|
215
|
-
|
|
1465
|
+
function Companion_1() {
|
|
1466
|
+
Companion_instance_1 = this;
|
|
216
1467
|
var tmp = this;
|
|
217
1468
|
var tmp0 = get_entries_0();
|
|
218
1469
|
var tmp$ret$0;
|
|
@@ -228,10 +1479,10 @@
|
|
|
228
1479
|
tmp$ret$0 = maxElem;
|
|
229
1480
|
break $l$block_0;
|
|
230
1481
|
}
|
|
231
|
-
var maxValue = maxElem.
|
|
1482
|
+
var maxValue = maxElem.m3h_1;
|
|
232
1483
|
do {
|
|
233
1484
|
var e = iterator.v();
|
|
234
|
-
var v = e.
|
|
1485
|
+
var v = e.m3h_1;
|
|
235
1486
|
if (compareTo(maxValue, v) < 0) {
|
|
236
1487
|
maxElem = e;
|
|
237
1488
|
maxValue = v;
|
|
@@ -240,10 +1491,10 @@
|
|
|
240
1491
|
while (iterator.u());
|
|
241
1492
|
tmp$ret$0 = maxElem;
|
|
242
1493
|
}
|
|
243
|
-
tmp.
|
|
1494
|
+
tmp.n3h_1 = ensureNotNull(tmp$ret$0).m3h_1;
|
|
244
1495
|
var tmp_0 = this;
|
|
245
1496
|
var tmp_1 = 0;
|
|
246
|
-
var tmp_2 = this.
|
|
1497
|
+
var tmp_2 = this.n3h_1 + 1 | 0;
|
|
247
1498
|
// Inline function 'kotlin.arrayOfNulls' call
|
|
248
1499
|
var tmp_3 = Array(tmp_2);
|
|
249
1500
|
while (tmp_1 < tmp_2) {
|
|
@@ -257,7 +1508,7 @@
|
|
|
257
1508
|
var _iterator__ex2g4s = tmp0_0.t();
|
|
258
1509
|
while (_iterator__ex2g4s.u()) {
|
|
259
1510
|
var element = _iterator__ex2g4s.v();
|
|
260
|
-
if (element.
|
|
1511
|
+
if (element.m3h_1 === tmp_4) {
|
|
261
1512
|
if (found) {
|
|
262
1513
|
tmp$ret$5 = null;
|
|
263
1514
|
break $l$block_2;
|
|
@@ -275,14 +1526,14 @@
|
|
|
275
1526
|
tmp_3[tmp_4] = tmp$ret$5;
|
|
276
1527
|
tmp_1 = tmp_1 + 1 | 0;
|
|
277
1528
|
}
|
|
278
|
-
tmp_0.
|
|
1529
|
+
tmp_0.o3h_1 = tmp_3;
|
|
279
1530
|
}
|
|
280
|
-
var
|
|
281
|
-
function
|
|
1531
|
+
var Companion_instance_1;
|
|
1532
|
+
function Companion_getInstance_1() {
|
|
282
1533
|
FrameType_initEntries();
|
|
283
|
-
if (
|
|
284
|
-
new
|
|
285
|
-
return
|
|
1534
|
+
if (Companion_instance_1 == null)
|
|
1535
|
+
new Companion_1();
|
|
1536
|
+
return Companion_instance_1;
|
|
286
1537
|
}
|
|
287
1538
|
function values_0() {
|
|
288
1539
|
return [FrameType_TEXT_getInstance(), FrameType_BINARY_getInstance(), FrameType_CLOSE_getInstance(), FrameType_PING_getInstance(), FrameType_PONG_getInstance()];
|
|
@@ -302,13 +1553,13 @@
|
|
|
302
1553
|
FrameType_CLOSE_instance = new FrameType('CLOSE', 2, true, 8);
|
|
303
1554
|
FrameType_PING_instance = new FrameType('PING', 3, true, 9);
|
|
304
1555
|
FrameType_PONG_instance = new FrameType('PONG', 4, true, 10);
|
|
305
|
-
|
|
1556
|
+
Companion_getInstance_1();
|
|
306
1557
|
}
|
|
307
1558
|
var $ENTRIES_0;
|
|
308
1559
|
function FrameType(name, ordinal, controlFrame, opcode) {
|
|
309
1560
|
Enum.call(this, name, ordinal);
|
|
310
|
-
this.
|
|
311
|
-
this.
|
|
1561
|
+
this.l3h_1 = controlFrame;
|
|
1562
|
+
this.m3h_1 = opcode;
|
|
312
1563
|
}
|
|
313
1564
|
function FrameType_TEXT_getInstance() {
|
|
314
1565
|
FrameType_initEntries();
|
|
@@ -330,6 +1581,794 @@
|
|
|
330
1581
|
FrameType_initEntries();
|
|
331
1582
|
return FrameType_PONG_instance;
|
|
332
1583
|
}
|
|
1584
|
+
function get_PongerCoroutineName() {
|
|
1585
|
+
_init_properties_PingPong_kt__9aqxey();
|
|
1586
|
+
return PongerCoroutineName;
|
|
1587
|
+
}
|
|
1588
|
+
var PongerCoroutineName;
|
|
1589
|
+
function get_PingerCoroutineName() {
|
|
1590
|
+
_init_properties_PingPong_kt__9aqxey();
|
|
1591
|
+
return PingerCoroutineName;
|
|
1592
|
+
}
|
|
1593
|
+
var PingerCoroutineName;
|
|
1594
|
+
function ponger(_this__u8e3s4, outgoing) {
|
|
1595
|
+
_init_properties_PingPong_kt__9aqxey();
|
|
1596
|
+
var channel = Channel(5);
|
|
1597
|
+
var tmp = get_PongerCoroutineName();
|
|
1598
|
+
launch(_this__u8e3s4, tmp, VOID, ponger$slambda_0(channel, outgoing, null));
|
|
1599
|
+
return channel;
|
|
1600
|
+
}
|
|
1601
|
+
function pinger(_this__u8e3s4, outgoing, periodMillis, timeoutMillis, onTimeout) {
|
|
1602
|
+
_init_properties_PingPong_kt__9aqxey();
|
|
1603
|
+
var actorJob = Job();
|
|
1604
|
+
var channel = Channel(2147483647);
|
|
1605
|
+
var tmp = actorJob.yg(get_PingerCoroutineName());
|
|
1606
|
+
launch(_this__u8e3s4, tmp, VOID, pinger$slambda_0(periodMillis, timeoutMillis, onTimeout, channel, outgoing, null));
|
|
1607
|
+
var tmp_0 = ensureNotNull(_this__u8e3s4.ss().n9(Key_instance));
|
|
1608
|
+
tmp_0.ut(pinger$lambda(actorJob));
|
|
1609
|
+
return channel;
|
|
1610
|
+
}
|
|
1611
|
+
function ponger$slambda($channel, $outgoing, resultContinuation) {
|
|
1612
|
+
this.x3h_1 = $channel;
|
|
1613
|
+
this.y3h_1 = $outgoing;
|
|
1614
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1615
|
+
}
|
|
1616
|
+
protoOf(ponger$slambda).x1w = function ($this$launch, $completion) {
|
|
1617
|
+
var tmp = this.y1w($this$launch, $completion);
|
|
1618
|
+
tmp.c9_1 = Unit_instance;
|
|
1619
|
+
tmp.d9_1 = null;
|
|
1620
|
+
return tmp.i9();
|
|
1621
|
+
};
|
|
1622
|
+
protoOf(ponger$slambda).u9 = function (p1, $completion) {
|
|
1623
|
+
return this.x1w((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
1624
|
+
};
|
|
1625
|
+
protoOf(ponger$slambda).i9 = function () {
|
|
1626
|
+
var suspendResult = this.c9_1;
|
|
1627
|
+
$sm: do
|
|
1628
|
+
try {
|
|
1629
|
+
var tmp = this.a9_1;
|
|
1630
|
+
switch (tmp) {
|
|
1631
|
+
case 0:
|
|
1632
|
+
this.b9_1 = 14;
|
|
1633
|
+
this.b9_1 = 13;
|
|
1634
|
+
this.d3i_1 = this.x3h_1;
|
|
1635
|
+
this.a9_1 = 1;
|
|
1636
|
+
continue $sm;
|
|
1637
|
+
case 1:
|
|
1638
|
+
this.b3i_1 = this.d3i_1;
|
|
1639
|
+
this.a3i_1 = null;
|
|
1640
|
+
this.a9_1 = 2;
|
|
1641
|
+
continue $sm;
|
|
1642
|
+
case 2:
|
|
1643
|
+
this.a9_1 = 3;
|
|
1644
|
+
continue $sm;
|
|
1645
|
+
case 3:
|
|
1646
|
+
this.b9_1 = 10;
|
|
1647
|
+
this.b9_1 = 9;
|
|
1648
|
+
this.c3i_1 = this.b3i_1.t();
|
|
1649
|
+
this.a9_1 = 4;
|
|
1650
|
+
continue $sm;
|
|
1651
|
+
case 4:
|
|
1652
|
+
this.a9_1 = 5;
|
|
1653
|
+
suspendResult = this.c3i_1.x19(this);
|
|
1654
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1655
|
+
return suspendResult;
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
continue $sm;
|
|
1659
|
+
case 5:
|
|
1660
|
+
if (!suspendResult) {
|
|
1661
|
+
this.a9_1 = 7;
|
|
1662
|
+
continue $sm;
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
var e = this.c3i_1.v();
|
|
1666
|
+
get_LOGGER().n2s('Received ping message, sending pong message');
|
|
1667
|
+
this.a9_1 = 6;
|
|
1668
|
+
suspendResult = this.y3h_1.u1b(new Pong(e.e3g_1), this);
|
|
1669
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1670
|
+
return suspendResult;
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1673
|
+
continue $sm;
|
|
1674
|
+
case 6:
|
|
1675
|
+
this.a9_1 = 4;
|
|
1676
|
+
continue $sm;
|
|
1677
|
+
case 7:
|
|
1678
|
+
this.a9_1 = 8;
|
|
1679
|
+
var tmp_0 = this;
|
|
1680
|
+
continue $sm;
|
|
1681
|
+
case 8:
|
|
1682
|
+
this.b9_1 = 13;
|
|
1683
|
+
cancelConsumed(this.b3i_1, this.a3i_1);
|
|
1684
|
+
this.a9_1 = 12;
|
|
1685
|
+
continue $sm;
|
|
1686
|
+
case 9:
|
|
1687
|
+
this.b9_1 = 10;
|
|
1688
|
+
var tmp_1 = this.d9_1;
|
|
1689
|
+
if (tmp_1 instanceof Error) {
|
|
1690
|
+
var e_0 = this.d9_1;
|
|
1691
|
+
var tmp_2 = this;
|
|
1692
|
+
this.a3i_1 = e_0;
|
|
1693
|
+
throw e_0;
|
|
1694
|
+
} else {
|
|
1695
|
+
throw this.d9_1;
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
case 10:
|
|
1699
|
+
this.b9_1 = 13;
|
|
1700
|
+
var t = this.d9_1;
|
|
1701
|
+
cancelConsumed(this.b3i_1, this.a3i_1);
|
|
1702
|
+
throw t;
|
|
1703
|
+
case 11:
|
|
1704
|
+
this.b9_1 = 13;
|
|
1705
|
+
cancelConsumed(this.b3i_1, this.a3i_1);
|
|
1706
|
+
if (false) {
|
|
1707
|
+
this.a9_1 = 1;
|
|
1708
|
+
continue $sm;
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
this.a9_1 = 12;
|
|
1712
|
+
continue $sm;
|
|
1713
|
+
case 12:
|
|
1714
|
+
this.b9_1 = 14;
|
|
1715
|
+
this.a9_1 = 15;
|
|
1716
|
+
continue $sm;
|
|
1717
|
+
case 13:
|
|
1718
|
+
this.b9_1 = 14;
|
|
1719
|
+
var tmp_3 = this.d9_1;
|
|
1720
|
+
if (tmp_3 instanceof ClosedSendChannelException) {
|
|
1721
|
+
var _unused_var__etf5q3 = this.d9_1;
|
|
1722
|
+
this.a9_1 = 15;
|
|
1723
|
+
continue $sm;
|
|
1724
|
+
} else {
|
|
1725
|
+
throw this.d9_1;
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
case 14:
|
|
1729
|
+
throw this.d9_1;
|
|
1730
|
+
case 15:
|
|
1731
|
+
this.b9_1 = 14;
|
|
1732
|
+
return Unit_instance;
|
|
1733
|
+
}
|
|
1734
|
+
} catch ($p) {
|
|
1735
|
+
var e_1 = $p;
|
|
1736
|
+
if (this.b9_1 === 14) {
|
|
1737
|
+
throw e_1;
|
|
1738
|
+
} else {
|
|
1739
|
+
this.a9_1 = this.b9_1;
|
|
1740
|
+
this.d9_1 = e_1;
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
while (true);
|
|
1744
|
+
};
|
|
1745
|
+
protoOf(ponger$slambda).y1w = function ($this$launch, completion) {
|
|
1746
|
+
var i = new ponger$slambda(this.x3h_1, this.y3h_1, completion);
|
|
1747
|
+
i.z3h_1 = $this$launch;
|
|
1748
|
+
return i;
|
|
1749
|
+
};
|
|
1750
|
+
function ponger$slambda_0($channel, $outgoing, resultContinuation) {
|
|
1751
|
+
var i = new ponger$slambda($channel, $outgoing, resultContinuation);
|
|
1752
|
+
var l = function ($this$launch, $completion) {
|
|
1753
|
+
return i.x1w($this$launch, $completion);
|
|
1754
|
+
};
|
|
1755
|
+
l.$arity = 1;
|
|
1756
|
+
return l;
|
|
1757
|
+
}
|
|
1758
|
+
function pinger$slambda$slambda($channel, resultContinuation) {
|
|
1759
|
+
this.m3i_1 = $channel;
|
|
1760
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1761
|
+
}
|
|
1762
|
+
protoOf(pinger$slambda$slambda).x1w = function ($this$withTimeoutOrNull, $completion) {
|
|
1763
|
+
var tmp = this.y1w($this$withTimeoutOrNull, $completion);
|
|
1764
|
+
tmp.c9_1 = Unit_instance;
|
|
1765
|
+
tmp.d9_1 = null;
|
|
1766
|
+
return tmp.i9();
|
|
1767
|
+
};
|
|
1768
|
+
protoOf(pinger$slambda$slambda).u9 = function (p1, $completion) {
|
|
1769
|
+
return this.x1w((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
1770
|
+
};
|
|
1771
|
+
protoOf(pinger$slambda$slambda).i9 = function () {
|
|
1772
|
+
var suspendResult = this.c9_1;
|
|
1773
|
+
$sm: do
|
|
1774
|
+
try {
|
|
1775
|
+
var tmp = this.a9_1;
|
|
1776
|
+
switch (tmp) {
|
|
1777
|
+
case 0:
|
|
1778
|
+
this.b9_1 = 3;
|
|
1779
|
+
this.a9_1 = 1;
|
|
1780
|
+
continue $sm;
|
|
1781
|
+
case 1:
|
|
1782
|
+
if (!true) {
|
|
1783
|
+
this.a9_1 = 4;
|
|
1784
|
+
continue $sm;
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
this.a9_1 = 2;
|
|
1788
|
+
suspendResult = this.m3i_1.y1b(this);
|
|
1789
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1790
|
+
return suspendResult;
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
continue $sm;
|
|
1794
|
+
case 2:
|
|
1795
|
+
this.a9_1 = 1;
|
|
1796
|
+
continue $sm;
|
|
1797
|
+
case 3:
|
|
1798
|
+
throw this.d9_1;
|
|
1799
|
+
case 4:
|
|
1800
|
+
return Unit_instance;
|
|
1801
|
+
}
|
|
1802
|
+
} catch ($p) {
|
|
1803
|
+
var e = $p;
|
|
1804
|
+
if (this.b9_1 === 3) {
|
|
1805
|
+
throw e;
|
|
1806
|
+
} else {
|
|
1807
|
+
this.a9_1 = this.b9_1;
|
|
1808
|
+
this.d9_1 = e;
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1811
|
+
while (true);
|
|
1812
|
+
};
|
|
1813
|
+
protoOf(pinger$slambda$slambda).y1w = function ($this$withTimeoutOrNull, completion) {
|
|
1814
|
+
var i = new pinger$slambda$slambda(this.m3i_1, completion);
|
|
1815
|
+
i.n3i_1 = $this$withTimeoutOrNull;
|
|
1816
|
+
return i;
|
|
1817
|
+
};
|
|
1818
|
+
function pinger$slambda$slambda_0($channel, resultContinuation) {
|
|
1819
|
+
var i = new pinger$slambda$slambda($channel, resultContinuation);
|
|
1820
|
+
var l = function ($this$withTimeoutOrNull, $completion) {
|
|
1821
|
+
return i.x1w($this$withTimeoutOrNull, $completion);
|
|
1822
|
+
};
|
|
1823
|
+
l.$arity = 1;
|
|
1824
|
+
return l;
|
|
1825
|
+
}
|
|
1826
|
+
function pinger$slambda$slambda_1($outgoing, $pingMessage, $channel, resultContinuation) {
|
|
1827
|
+
this.w3i_1 = $outgoing;
|
|
1828
|
+
this.x3i_1 = $pingMessage;
|
|
1829
|
+
this.y3i_1 = $channel;
|
|
1830
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1831
|
+
}
|
|
1832
|
+
protoOf(pinger$slambda$slambda_1).x1w = function ($this$withTimeoutOrNull, $completion) {
|
|
1833
|
+
var tmp = this.y1w($this$withTimeoutOrNull, $completion);
|
|
1834
|
+
tmp.c9_1 = Unit_instance;
|
|
1835
|
+
tmp.d9_1 = null;
|
|
1836
|
+
return tmp.i9();
|
|
1837
|
+
};
|
|
1838
|
+
protoOf(pinger$slambda$slambda_1).u9 = function (p1, $completion) {
|
|
1839
|
+
return this.x1w((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
1840
|
+
};
|
|
1841
|
+
protoOf(pinger$slambda$slambda_1).i9 = function () {
|
|
1842
|
+
var suspendResult = this.c9_1;
|
|
1843
|
+
$sm: do
|
|
1844
|
+
try {
|
|
1845
|
+
var tmp = this.a9_1;
|
|
1846
|
+
switch (tmp) {
|
|
1847
|
+
case 0:
|
|
1848
|
+
this.b9_1 = 6;
|
|
1849
|
+
get_LOGGER().n2s('WebSocket Pinger: sending ping frame');
|
|
1850
|
+
this.a9_1 = 1;
|
|
1851
|
+
suspendResult = this.w3i_1.u1b(new Ping(toByteArray(this.x3i_1, Charsets_getInstance().y1x_1)), this);
|
|
1852
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1853
|
+
return suspendResult;
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
continue $sm;
|
|
1857
|
+
case 1:
|
|
1858
|
+
this.a9_1 = 2;
|
|
1859
|
+
continue $sm;
|
|
1860
|
+
case 2:
|
|
1861
|
+
if (!true) {
|
|
1862
|
+
this.a9_1 = 5;
|
|
1863
|
+
continue $sm;
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
this.a9_1 = 3;
|
|
1867
|
+
suspendResult = this.y3i_1.y1b(this);
|
|
1868
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1869
|
+
return suspendResult;
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1872
|
+
continue $sm;
|
|
1873
|
+
case 3:
|
|
1874
|
+
this.a3j_1 = suspendResult;
|
|
1875
|
+
if (decodeToString(this.a3j_1.e3g_1, 0, 0 + this.a3j_1.e3g_1.length | 0) === this.x3i_1) {
|
|
1876
|
+
get_LOGGER().n2s('WebSocket Pinger: received valid pong frame ' + this.a3j_1.toString());
|
|
1877
|
+
this.a9_1 = 5;
|
|
1878
|
+
continue $sm;
|
|
1879
|
+
} else {
|
|
1880
|
+
this.a9_1 = 4;
|
|
1881
|
+
continue $sm;
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
case 4:
|
|
1885
|
+
get_LOGGER().n2s('WebSocket Pinger: received invalid pong frame ' + this.a3j_1.toString() + ', continue waiting');
|
|
1886
|
+
this.a9_1 = 2;
|
|
1887
|
+
continue $sm;
|
|
1888
|
+
case 5:
|
|
1889
|
+
return Unit_instance;
|
|
1890
|
+
case 6:
|
|
1891
|
+
throw this.d9_1;
|
|
1892
|
+
}
|
|
1893
|
+
} catch ($p) {
|
|
1894
|
+
var e = $p;
|
|
1895
|
+
if (this.b9_1 === 6) {
|
|
1896
|
+
throw e;
|
|
1897
|
+
} else {
|
|
1898
|
+
this.a9_1 = this.b9_1;
|
|
1899
|
+
this.d9_1 = e;
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
while (true);
|
|
1903
|
+
};
|
|
1904
|
+
protoOf(pinger$slambda$slambda_1).y1w = function ($this$withTimeoutOrNull, completion) {
|
|
1905
|
+
var i = new pinger$slambda$slambda_1(this.w3i_1, this.x3i_1, this.y3i_1, completion);
|
|
1906
|
+
i.z3i_1 = $this$withTimeoutOrNull;
|
|
1907
|
+
return i;
|
|
1908
|
+
};
|
|
1909
|
+
function pinger$slambda$slambda_2($outgoing, $pingMessage, $channel, resultContinuation) {
|
|
1910
|
+
var i = new pinger$slambda$slambda_1($outgoing, $pingMessage, $channel, resultContinuation);
|
|
1911
|
+
var l = function ($this$withTimeoutOrNull, $completion) {
|
|
1912
|
+
return i.x1w($this$withTimeoutOrNull, $completion);
|
|
1913
|
+
};
|
|
1914
|
+
l.$arity = 1;
|
|
1915
|
+
return l;
|
|
1916
|
+
}
|
|
1917
|
+
function pinger$slambda($periodMillis, $timeoutMillis, $onTimeout, $channel, $outgoing, resultContinuation) {
|
|
1918
|
+
this.j3j_1 = $periodMillis;
|
|
1919
|
+
this.k3j_1 = $timeoutMillis;
|
|
1920
|
+
this.l3j_1 = $onTimeout;
|
|
1921
|
+
this.m3j_1 = $channel;
|
|
1922
|
+
this.n3j_1 = $outgoing;
|
|
1923
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1924
|
+
}
|
|
1925
|
+
protoOf(pinger$slambda).x1w = function ($this$launch, $completion) {
|
|
1926
|
+
var tmp = this.y1w($this$launch, $completion);
|
|
1927
|
+
tmp.c9_1 = Unit_instance;
|
|
1928
|
+
tmp.d9_1 = null;
|
|
1929
|
+
return tmp.i9();
|
|
1930
|
+
};
|
|
1931
|
+
protoOf(pinger$slambda).u9 = function (p1, $completion) {
|
|
1932
|
+
return this.x1w((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
1933
|
+
};
|
|
1934
|
+
protoOf(pinger$slambda).i9 = function () {
|
|
1935
|
+
var suspendResult = this.c9_1;
|
|
1936
|
+
$sm: do
|
|
1937
|
+
try {
|
|
1938
|
+
var tmp = this.a9_1;
|
|
1939
|
+
switch (tmp) {
|
|
1940
|
+
case 0:
|
|
1941
|
+
this.b9_1 = 9;
|
|
1942
|
+
get_LOGGER().n2s('Starting WebSocket pinger coroutine with period ' + this.j3j_1.toString() + ' ms and timeout ' + this.k3j_1.toString() + ' ms');
|
|
1943
|
+
this.q3j_1 = Random(getTimeMillis());
|
|
1944
|
+
this.p3j_1 = new Int8Array(32);
|
|
1945
|
+
this.b9_1 = 7;
|
|
1946
|
+
this.a9_1 = 1;
|
|
1947
|
+
continue $sm;
|
|
1948
|
+
case 1:
|
|
1949
|
+
if (!true) {
|
|
1950
|
+
this.a9_1 = 6;
|
|
1951
|
+
continue $sm;
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
this.a9_1 = 2;
|
|
1955
|
+
suspendResult = withTimeoutOrNull(this.j3j_1, pinger$slambda$slambda_0(this.m3j_1, null), this);
|
|
1956
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1957
|
+
return suspendResult;
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
continue $sm;
|
|
1961
|
+
case 2:
|
|
1962
|
+
this.q3j_1.vi(this.p3j_1);
|
|
1963
|
+
var pingMessage = '[ping ' + hex(this.p3j_1) + ' ping]';
|
|
1964
|
+
this.a9_1 = 3;
|
|
1965
|
+
suspendResult = withTimeoutOrNull(this.k3j_1, pinger$slambda$slambda_2(this.n3j_1, pingMessage, this.m3j_1, null), this);
|
|
1966
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1967
|
+
return suspendResult;
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
continue $sm;
|
|
1971
|
+
case 3:
|
|
1972
|
+
var rc = suspendResult;
|
|
1973
|
+
if (rc == null) {
|
|
1974
|
+
get_LOGGER().n2s('WebSocket pinger has timed out');
|
|
1975
|
+
this.a9_1 = 5;
|
|
1976
|
+
suspendResult = this.l3j_1(CloseReason_init_$Create$(Codes_INTERNAL_ERROR_getInstance(), 'Ping timeout'), this);
|
|
1977
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1978
|
+
return suspendResult;
|
|
1979
|
+
}
|
|
1980
|
+
continue $sm;
|
|
1981
|
+
} else {
|
|
1982
|
+
this.a9_1 = 4;
|
|
1983
|
+
continue $sm;
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
case 4:
|
|
1987
|
+
this.a9_1 = 1;
|
|
1988
|
+
continue $sm;
|
|
1989
|
+
case 5:
|
|
1990
|
+
this.a9_1 = 6;
|
|
1991
|
+
continue $sm;
|
|
1992
|
+
case 6:
|
|
1993
|
+
this.b9_1 = 9;
|
|
1994
|
+
this.a9_1 = 8;
|
|
1995
|
+
continue $sm;
|
|
1996
|
+
case 7:
|
|
1997
|
+
this.b9_1 = 9;
|
|
1998
|
+
var tmp_0 = this.d9_1;
|
|
1999
|
+
if (tmp_0 instanceof CancellationException) {
|
|
2000
|
+
var ignore = this.d9_1;
|
|
2001
|
+
this.a9_1 = 8;
|
|
2002
|
+
continue $sm;
|
|
2003
|
+
} else {
|
|
2004
|
+
var tmp_1 = this.d9_1;
|
|
2005
|
+
if (tmp_1 instanceof ClosedReceiveChannelException) {
|
|
2006
|
+
var ignore_0 = this.d9_1;
|
|
2007
|
+
this.a9_1 = 8;
|
|
2008
|
+
continue $sm;
|
|
2009
|
+
} else {
|
|
2010
|
+
var tmp_2 = this.d9_1;
|
|
2011
|
+
if (tmp_2 instanceof ClosedSendChannelException) {
|
|
2012
|
+
var ignore_1 = this.d9_1;
|
|
2013
|
+
this.a9_1 = 8;
|
|
2014
|
+
continue $sm;
|
|
2015
|
+
} else {
|
|
2016
|
+
var tmp_3 = this.d9_1;
|
|
2017
|
+
if (tmp_3 instanceof ClosedByteChannelException) {
|
|
2018
|
+
var ignore_2 = this.d9_1;
|
|
2019
|
+
this.a9_1 = 8;
|
|
2020
|
+
continue $sm;
|
|
2021
|
+
} else {
|
|
2022
|
+
throw this.d9_1;
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
case 8:
|
|
2029
|
+
this.b9_1 = 9;
|
|
2030
|
+
return Unit_instance;
|
|
2031
|
+
case 9:
|
|
2032
|
+
throw this.d9_1;
|
|
2033
|
+
}
|
|
2034
|
+
} catch ($p) {
|
|
2035
|
+
var e = $p;
|
|
2036
|
+
if (this.b9_1 === 9) {
|
|
2037
|
+
throw e;
|
|
2038
|
+
} else {
|
|
2039
|
+
this.a9_1 = this.b9_1;
|
|
2040
|
+
this.d9_1 = e;
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
while (true);
|
|
2044
|
+
};
|
|
2045
|
+
protoOf(pinger$slambda).y1w = function ($this$launch, completion) {
|
|
2046
|
+
var i = new pinger$slambda(this.j3j_1, this.k3j_1, this.l3j_1, this.m3j_1, this.n3j_1, completion);
|
|
2047
|
+
i.o3j_1 = $this$launch;
|
|
2048
|
+
return i;
|
|
2049
|
+
};
|
|
2050
|
+
function pinger$slambda_0($periodMillis, $timeoutMillis, $onTimeout, $channel, $outgoing, resultContinuation) {
|
|
2051
|
+
var i = new pinger$slambda($periodMillis, $timeoutMillis, $onTimeout, $channel, $outgoing, resultContinuation);
|
|
2052
|
+
var l = function ($this$launch, $completion) {
|
|
2053
|
+
return i.x1w($this$launch, $completion);
|
|
2054
|
+
};
|
|
2055
|
+
l.$arity = 1;
|
|
2056
|
+
return l;
|
|
2057
|
+
}
|
|
2058
|
+
function pinger$lambda($actorJob) {
|
|
2059
|
+
return function (it) {
|
|
2060
|
+
$actorJob.cu();
|
|
2061
|
+
return Unit_instance;
|
|
2062
|
+
};
|
|
2063
|
+
}
|
|
2064
|
+
var properties_initialized_PingPong_kt_fbfhmc;
|
|
2065
|
+
function _init_properties_PingPong_kt__9aqxey() {
|
|
2066
|
+
if (!properties_initialized_PingPong_kt_fbfhmc) {
|
|
2067
|
+
properties_initialized_PingPong_kt_fbfhmc = true;
|
|
2068
|
+
PongerCoroutineName = new CoroutineName('ws-ponger');
|
|
2069
|
+
PingerCoroutineName = new CoroutineName('ws-pinger');
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
function Companion_2() {
|
|
2073
|
+
Companion_instance_2 = this;
|
|
2074
|
+
var tmp = this;
|
|
2075
|
+
// Inline function 'kotlin.apply' call
|
|
2076
|
+
var this_0 = new WebSocketChannelsConfig();
|
|
2077
|
+
this_0.p3c_1 = this_0.r3j();
|
|
2078
|
+
this_0.q3c_1 = this_0.r3j();
|
|
2079
|
+
tmp.o3c_1 = this_0;
|
|
2080
|
+
}
|
|
2081
|
+
var Companion_instance_2;
|
|
2082
|
+
function Companion_getInstance_2() {
|
|
2083
|
+
if (Companion_instance_2 == null)
|
|
2084
|
+
new Companion_2();
|
|
2085
|
+
return Companion_instance_2;
|
|
2086
|
+
}
|
|
2087
|
+
function WebSocketChannelsConfig() {
|
|
2088
|
+
Companion_getInstance_2();
|
|
2089
|
+
this.p3c_1 = Companion_getInstance_3().s3j_1;
|
|
2090
|
+
this.q3c_1 = Companion_getInstance_3().s3j_1;
|
|
2091
|
+
}
|
|
2092
|
+
protoOf(WebSocketChannelsConfig).r3j = function () {
|
|
2093
|
+
return Companion_getInstance_3().s3j_1;
|
|
2094
|
+
};
|
|
2095
|
+
function from(_this__u8e3s4, config) {
|
|
2096
|
+
// Inline function 'kotlin.with' call
|
|
2097
|
+
var tmp;
|
|
2098
|
+
if (config.t3j_1 === 2147483647) {
|
|
2099
|
+
tmp = Channel(2147483647);
|
|
2100
|
+
} else if (config.u3j_1.equals(ChannelOverflow_SUSPEND_getInstance())) {
|
|
2101
|
+
tmp = Channel(config.t3j_1, BufferOverflow_SUSPEND_getInstance());
|
|
2102
|
+
} else if (config.u3j_1.equals(ChannelOverflow_CLOSE_getInstance())) {
|
|
2103
|
+
tmp = new BoundedChannel(config.t3j_1);
|
|
2104
|
+
} else {
|
|
2105
|
+
// Inline function 'kotlin.error' call
|
|
2106
|
+
var message = 'Unsupported channel config.';
|
|
2107
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
2108
|
+
}
|
|
2109
|
+
return tmp;
|
|
2110
|
+
}
|
|
2111
|
+
function Companion_3() {
|
|
2112
|
+
Companion_instance_3 = this;
|
|
2113
|
+
this.s3j_1 = new ChannelConfig(2147483647, ChannelOverflow_SUSPEND_getInstance());
|
|
2114
|
+
}
|
|
2115
|
+
var Companion_instance_3;
|
|
2116
|
+
function Companion_getInstance_3() {
|
|
2117
|
+
if (Companion_instance_3 == null)
|
|
2118
|
+
new Companion_3();
|
|
2119
|
+
return Companion_instance_3;
|
|
2120
|
+
}
|
|
2121
|
+
function ChannelConfig(capacity, onOverflow) {
|
|
2122
|
+
Companion_getInstance_3();
|
|
2123
|
+
this.t3j_1 = capacity;
|
|
2124
|
+
this.u3j_1 = onOverflow;
|
|
2125
|
+
}
|
|
2126
|
+
protoOf(ChannelConfig).v3j = function () {
|
|
2127
|
+
return this.u3j_1.equals(ChannelOverflow_SUSPEND_getInstance()) && !(this.t3j_1 === 2147483647);
|
|
2128
|
+
};
|
|
2129
|
+
var ChannelOverflow_SUSPEND_instance;
|
|
2130
|
+
var ChannelOverflow_CLOSE_instance;
|
|
2131
|
+
var ChannelOverflow_entriesInitialized;
|
|
2132
|
+
function ChannelOverflow_initEntries() {
|
|
2133
|
+
if (ChannelOverflow_entriesInitialized)
|
|
2134
|
+
return Unit_instance;
|
|
2135
|
+
ChannelOverflow_entriesInitialized = true;
|
|
2136
|
+
ChannelOverflow_SUSPEND_instance = new ChannelOverflow('SUSPEND', 0);
|
|
2137
|
+
ChannelOverflow_CLOSE_instance = new ChannelOverflow('CLOSE', 1);
|
|
2138
|
+
}
|
|
2139
|
+
function ChannelOverflow(name, ordinal) {
|
|
2140
|
+
Enum.call(this, name, ordinal);
|
|
2141
|
+
}
|
|
2142
|
+
function BoundedChannel$Companion$createDelegate$lambda($channel) {
|
|
2143
|
+
return function (it) {
|
|
2144
|
+
var tmp;
|
|
2145
|
+
var tmp_0;
|
|
2146
|
+
if ($channel._v == null) {
|
|
2147
|
+
throwUninitializedPropertyAccessException('channel');
|
|
2148
|
+
} else {
|
|
2149
|
+
tmp_0 = $channel._v;
|
|
2150
|
+
}
|
|
2151
|
+
if (!tmp_0.z19()) {
|
|
2152
|
+
var tmp_1;
|
|
2153
|
+
if ($channel._v == null) {
|
|
2154
|
+
throwUninitializedPropertyAccessException('channel');
|
|
2155
|
+
} else {
|
|
2156
|
+
tmp_1 = $channel._v;
|
|
2157
|
+
}
|
|
2158
|
+
tmp_1.a1c(new ChannelOverflowException('Channel overflowed'));
|
|
2159
|
+
tmp = Unit_instance;
|
|
2160
|
+
}
|
|
2161
|
+
return Unit_instance;
|
|
2162
|
+
};
|
|
2163
|
+
}
|
|
2164
|
+
function Companion_4() {
|
|
2165
|
+
}
|
|
2166
|
+
protoOf(Companion_4).w3j = function (capacity) {
|
|
2167
|
+
var channel = {_v: null};
|
|
2168
|
+
var tmp = BufferOverflow_DROP_OLDEST_getInstance();
|
|
2169
|
+
// Inline function 'kotlin.also' call
|
|
2170
|
+
var this_0 = Channel(capacity, tmp, BoundedChannel$Companion$createDelegate$lambda(channel));
|
|
2171
|
+
channel._v = this_0;
|
|
2172
|
+
return this_0;
|
|
2173
|
+
};
|
|
2174
|
+
var Companion_instance_4;
|
|
2175
|
+
function Companion_getInstance_4() {
|
|
2176
|
+
return Companion_instance_4;
|
|
2177
|
+
}
|
|
2178
|
+
function BoundedChannel(capacity, delegate) {
|
|
2179
|
+
delegate = delegate === VOID ? Companion_instance_4.w3j(capacity) : delegate;
|
|
2180
|
+
this.x3j_1 = delegate;
|
|
2181
|
+
}
|
|
2182
|
+
protoOf(BoundedChannel).y3j = function (element) {
|
|
2183
|
+
var result = this.x3j_1.v1b(element);
|
|
2184
|
+
if (!_ChannelResult___get_isSuccess__impl__odq1z9(result) && !_ChannelResult___get_isClosed__impl__mg7kuu(result)) {
|
|
2185
|
+
this.a1c(new ChannelOverflowException('Channel overflowed'));
|
|
2186
|
+
}
|
|
2187
|
+
return result;
|
|
2188
|
+
};
|
|
2189
|
+
protoOf(BoundedChannel).v1b = function (element) {
|
|
2190
|
+
return this.y3j(element);
|
|
2191
|
+
};
|
|
2192
|
+
protoOf(BoundedChannel).z3j = function (element, $completion) {
|
|
2193
|
+
return this.x3j_1.u1b(element, $completion);
|
|
2194
|
+
};
|
|
2195
|
+
protoOf(BoundedChannel).u1b = function (element, $completion) {
|
|
2196
|
+
return this.z3j(element, $completion);
|
|
2197
|
+
};
|
|
2198
|
+
protoOf(BoundedChannel).a1c = function (cause) {
|
|
2199
|
+
return this.x3j_1.a1c(cause);
|
|
2200
|
+
};
|
|
2201
|
+
protoOf(BoundedChannel).z19 = function () {
|
|
2202
|
+
return this.x3j_1.z19();
|
|
2203
|
+
};
|
|
2204
|
+
protoOf(BoundedChannel).a3k = function ($completion) {
|
|
2205
|
+
return this.x3j_1.y1b($completion);
|
|
2206
|
+
};
|
|
2207
|
+
protoOf(BoundedChannel).y1b = function ($completion) {
|
|
2208
|
+
return this.a3k($completion);
|
|
2209
|
+
};
|
|
2210
|
+
protoOf(BoundedChannel).t = function () {
|
|
2211
|
+
return this.x3j_1.t();
|
|
2212
|
+
};
|
|
2213
|
+
protoOf(BoundedChannel).bu = function (cause) {
|
|
2214
|
+
this.x3j_1.bu(cause);
|
|
2215
|
+
};
|
|
2216
|
+
function ChannelOverflowException(message) {
|
|
2217
|
+
RuntimeException_init_$Init$(message, this);
|
|
2218
|
+
captureStack(this, ChannelOverflowException);
|
|
2219
|
+
}
|
|
2220
|
+
function ChannelOverflow_SUSPEND_getInstance() {
|
|
2221
|
+
ChannelOverflow_initEntries();
|
|
2222
|
+
return ChannelOverflow_SUSPEND_instance;
|
|
2223
|
+
}
|
|
2224
|
+
function ChannelOverflow_CLOSE_getInstance() {
|
|
2225
|
+
ChannelOverflow_initEntries();
|
|
2226
|
+
return ChannelOverflow_CLOSE_instance;
|
|
2227
|
+
}
|
|
2228
|
+
function WebSocketExtension() {
|
|
2229
|
+
}
|
|
2230
|
+
function WebSocketExtensionsConfig() {
|
|
2231
|
+
var tmp = this;
|
|
2232
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
2233
|
+
tmp.d3k_1 = ArrayList_init_$Create$();
|
|
2234
|
+
var tmp_0 = this;
|
|
2235
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2236
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2237
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2238
|
+
tmp_0.e3k_1 = [false, false, false];
|
|
2239
|
+
}
|
|
2240
|
+
protoOf(WebSocketExtensionsConfig).e2v = function () {
|
|
2241
|
+
// Inline function 'kotlin.collections.map' call
|
|
2242
|
+
var this_0 = this.d3k_1;
|
|
2243
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
2244
|
+
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
2245
|
+
var _iterator__ex2g4s = this_0.t();
|
|
2246
|
+
while (_iterator__ex2g4s.u()) {
|
|
2247
|
+
var item = _iterator__ex2g4s.v();
|
|
2248
|
+
var tmp$ret$2 = item();
|
|
2249
|
+
destination.j1(tmp$ret$2);
|
|
2250
|
+
}
|
|
2251
|
+
return destination;
|
|
2252
|
+
};
|
|
2253
|
+
function parametersToString($this) {
|
|
2254
|
+
return $this.g3k_1.r() ? '' : '; ' + joinToString($this.g3k_1, ';');
|
|
2255
|
+
}
|
|
2256
|
+
function WebSocketExtensionHeader(name, parameters) {
|
|
2257
|
+
this.f3k_1 = name;
|
|
2258
|
+
this.g3k_1 = parameters;
|
|
2259
|
+
}
|
|
2260
|
+
protoOf(WebSocketExtensionHeader).toString = function () {
|
|
2261
|
+
return this.f3k_1 + ' ' + parametersToString(this);
|
|
2262
|
+
};
|
|
2263
|
+
function parseWebSocketExtensions(value) {
|
|
2264
|
+
// Inline function 'kotlin.collections.map' call
|
|
2265
|
+
var this_0 = split(value, [',']);
|
|
2266
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
2267
|
+
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
2268
|
+
var _iterator__ex2g4s = this_0.t();
|
|
2269
|
+
while (_iterator__ex2g4s.u()) {
|
|
2270
|
+
var item = _iterator__ex2g4s.v();
|
|
2271
|
+
var extension = split(item, [';']);
|
|
2272
|
+
// Inline function 'kotlin.text.trim' call
|
|
2273
|
+
var this_1 = first(extension);
|
|
2274
|
+
var name = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
|
|
2275
|
+
// Inline function 'kotlin.collections.map' call
|
|
2276
|
+
var this_2 = drop(extension, 1);
|
|
2277
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
2278
|
+
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
|
|
2279
|
+
var _iterator__ex2g4s_0 = this_2.t();
|
|
2280
|
+
while (_iterator__ex2g4s_0.u()) {
|
|
2281
|
+
var item_0 = _iterator__ex2g4s_0.v();
|
|
2282
|
+
// Inline function 'kotlin.text.trim' call
|
|
2283
|
+
var tmp$ret$6 = toString(trim(isCharSequence(item_0) ? item_0 : THROW_CCE()));
|
|
2284
|
+
destination_0.j1(tmp$ret$6);
|
|
2285
|
+
}
|
|
2286
|
+
var parameters = destination_0;
|
|
2287
|
+
var tmp$ret$2 = new WebSocketExtensionHeader(name, parameters);
|
|
2288
|
+
destination.j1(tmp$ret$2);
|
|
2289
|
+
}
|
|
2290
|
+
return destination;
|
|
2291
|
+
}
|
|
2292
|
+
function WebSocketSession() {
|
|
2293
|
+
}
|
|
2294
|
+
function close(_this__u8e3s4, reason, $completion) {
|
|
2295
|
+
reason = reason === VOID ? CloseReason_init_$Create$(Codes_NORMAL_getInstance(), '') : reason;
|
|
2296
|
+
var tmp = new $closeCOROUTINE$(_this__u8e3s4, reason, $completion);
|
|
2297
|
+
tmp.c9_1 = Unit_instance;
|
|
2298
|
+
tmp.d9_1 = null;
|
|
2299
|
+
return tmp.i9();
|
|
2300
|
+
}
|
|
2301
|
+
function closeExceptionally(_this__u8e3s4, cause, $completion) {
|
|
2302
|
+
var tmp;
|
|
2303
|
+
if (cause instanceof CancellationException) {
|
|
2304
|
+
tmp = CloseReason_init_$Create$(Codes_NORMAL_getInstance(), '');
|
|
2305
|
+
} else {
|
|
2306
|
+
tmp = CloseReason_init_$Create$(Codes_INTERNAL_ERROR_getInstance(), cause.toString());
|
|
2307
|
+
}
|
|
2308
|
+
var reason = tmp;
|
|
2309
|
+
return close(_this__u8e3s4, reason, $completion);
|
|
2310
|
+
}
|
|
2311
|
+
function $closeCOROUTINE$(_this__u8e3s4, reason, resultContinuation) {
|
|
2312
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
2313
|
+
this.p3k_1 = _this__u8e3s4;
|
|
2314
|
+
this.q3k_1 = reason;
|
|
2315
|
+
}
|
|
2316
|
+
protoOf($closeCOROUTINE$).i9 = function () {
|
|
2317
|
+
var suspendResult = this.c9_1;
|
|
2318
|
+
$sm: do
|
|
2319
|
+
try {
|
|
2320
|
+
var tmp = this.a9_1;
|
|
2321
|
+
switch (tmp) {
|
|
2322
|
+
case 0:
|
|
2323
|
+
this.b9_1 = 4;
|
|
2324
|
+
this.b9_1 = 3;
|
|
2325
|
+
this.a9_1 = 1;
|
|
2326
|
+
suspendResult = this.p3k_1.n3c(Close_init_$Create$(this.q3k_1), this);
|
|
2327
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2328
|
+
return suspendResult;
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
continue $sm;
|
|
2332
|
+
case 1:
|
|
2333
|
+
this.a9_1 = 2;
|
|
2334
|
+
suspendResult = this.p3k_1.r1n(this);
|
|
2335
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2336
|
+
return suspendResult;
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
continue $sm;
|
|
2340
|
+
case 2:
|
|
2341
|
+
this.b9_1 = 4;
|
|
2342
|
+
this.a9_1 = 5;
|
|
2343
|
+
continue $sm;
|
|
2344
|
+
case 3:
|
|
2345
|
+
this.b9_1 = 4;
|
|
2346
|
+
var tmp_0 = this.d9_1;
|
|
2347
|
+
if (tmp_0 instanceof Error) {
|
|
2348
|
+
var _unused_var__etf5q3 = this.d9_1;
|
|
2349
|
+
this.a9_1 = 5;
|
|
2350
|
+
continue $sm;
|
|
2351
|
+
} else {
|
|
2352
|
+
throw this.d9_1;
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
case 4:
|
|
2356
|
+
throw this.d9_1;
|
|
2357
|
+
case 5:
|
|
2358
|
+
this.b9_1 = 4;
|
|
2359
|
+
return Unit_instance;
|
|
2360
|
+
}
|
|
2361
|
+
} catch ($p) {
|
|
2362
|
+
var e = $p;
|
|
2363
|
+
if (this.b9_1 === 4) {
|
|
2364
|
+
throw e;
|
|
2365
|
+
} else {
|
|
2366
|
+
this.a9_1 = this.b9_1;
|
|
2367
|
+
this.d9_1 = e;
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
while (true);
|
|
2371
|
+
};
|
|
333
2372
|
function Binary_init_$Init$(fin, data, $this) {
|
|
334
2373
|
Binary.call($this, fin, data, false, false, false);
|
|
335
2374
|
return $this;
|
|
@@ -351,8 +2390,8 @@
|
|
|
351
2390
|
function Close_init_$Init$(reason, $this) {
|
|
352
2391
|
// Inline function 'io.ktor.utils.io.core.buildPacket' call
|
|
353
2392
|
var builder = new Buffer();
|
|
354
|
-
builder.
|
|
355
|
-
writeText(builder, reason.
|
|
2393
|
+
builder.cr(reason.f3c_1);
|
|
2394
|
+
writeText(builder, reason.g3c_1);
|
|
356
2395
|
Close_init_$Init$_0(builder, $this);
|
|
357
2396
|
return $this;
|
|
358
2397
|
}
|
|
@@ -364,7 +2403,7 @@
|
|
|
364
2403
|
return $this;
|
|
365
2404
|
}
|
|
366
2405
|
function Close_init_$Init$_1($this) {
|
|
367
|
-
Close.call($this,
|
|
2406
|
+
Close.call($this, Companion_getInstance_5().j3g_1);
|
|
368
2407
|
return $this;
|
|
369
2408
|
}
|
|
370
2409
|
function Close_init_$Create$_0() {
|
|
@@ -385,45 +2424,100 @@
|
|
|
385
2424
|
function Close(data) {
|
|
386
2425
|
Frame.call(this, true, FrameType_CLOSE_getInstance(), data, NonDisposableHandle_instance, false, false, false);
|
|
387
2426
|
}
|
|
388
|
-
function
|
|
389
|
-
|
|
390
|
-
this.m39_1 = new Int8Array(0);
|
|
2427
|
+
function Ping(data) {
|
|
2428
|
+
Frame.call(this, true, FrameType_PING_getInstance(), data, NonDisposableHandle_instance, false, false, false);
|
|
391
2429
|
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
2430
|
+
function Pong(data, disposableHandle) {
|
|
2431
|
+
disposableHandle = disposableHandle === VOID ? NonDisposableHandle_instance : disposableHandle;
|
|
2432
|
+
Frame.call(this, true, FrameType_PONG_getInstance(), data, disposableHandle, false, false, false);
|
|
2433
|
+
}
|
|
2434
|
+
function Companion_5() {
|
|
2435
|
+
Companion_instance_5 = this;
|
|
2436
|
+
this.j3g_1 = new Int8Array(0);
|
|
2437
|
+
}
|
|
2438
|
+
protoOf(Companion_5).k3g = function (fin, frameType, data, rsv1, rsv2, rsv3) {
|
|
2439
|
+
var tmp;
|
|
2440
|
+
switch (frameType.a1_1) {
|
|
2441
|
+
case 1:
|
|
2442
|
+
tmp = new Binary(fin, data, rsv1, rsv2, rsv3);
|
|
2443
|
+
break;
|
|
2444
|
+
case 0:
|
|
2445
|
+
tmp = new Text(fin, data, rsv1, rsv2, rsv3);
|
|
2446
|
+
break;
|
|
2447
|
+
case 2:
|
|
2448
|
+
tmp = new Close(data);
|
|
2449
|
+
break;
|
|
2450
|
+
case 3:
|
|
2451
|
+
tmp = new Ping(data);
|
|
2452
|
+
break;
|
|
2453
|
+
case 4:
|
|
2454
|
+
tmp = new Pong(data, NonDisposableHandle_instance);
|
|
2455
|
+
break;
|
|
2456
|
+
default:
|
|
2457
|
+
noWhenBranchMatchedException();
|
|
2458
|
+
break;
|
|
2459
|
+
}
|
|
2460
|
+
return tmp;
|
|
2461
|
+
};
|
|
2462
|
+
var Companion_instance_5;
|
|
2463
|
+
function Companion_getInstance_5() {
|
|
2464
|
+
if (Companion_instance_5 == null)
|
|
2465
|
+
new Companion_5();
|
|
2466
|
+
return Companion_instance_5;
|
|
397
2467
|
}
|
|
398
2468
|
function Frame(fin, frameType, data, disposableHandle, rsv1, rsv2, rsv3) {
|
|
399
|
-
|
|
2469
|
+
Companion_getInstance_5();
|
|
400
2470
|
disposableHandle = disposableHandle === VOID ? NonDisposableHandle_instance : disposableHandle;
|
|
401
2471
|
rsv1 = rsv1 === VOID ? false : rsv1;
|
|
402
2472
|
rsv2 = rsv2 === VOID ? false : rsv2;
|
|
403
2473
|
rsv3 = rsv3 === VOID ? false : rsv3;
|
|
404
|
-
this.
|
|
405
|
-
this.
|
|
406
|
-
this.
|
|
407
|
-
this.
|
|
408
|
-
this.
|
|
409
|
-
this.
|
|
410
|
-
this.
|
|
2474
|
+
this.c3g_1 = fin;
|
|
2475
|
+
this.d3g_1 = frameType;
|
|
2476
|
+
this.e3g_1 = data;
|
|
2477
|
+
this.f3g_1 = disposableHandle;
|
|
2478
|
+
this.g3g_1 = rsv1;
|
|
2479
|
+
this.h3g_1 = rsv2;
|
|
2480
|
+
this.i3g_1 = rsv3;
|
|
411
2481
|
}
|
|
412
2482
|
protoOf(Frame).toString = function () {
|
|
413
|
-
return 'Frame ' + this.
|
|
2483
|
+
return 'Frame ' + this.d3g_1.toString() + ' (fin=' + this.c3g_1 + ', buffer len = ' + this.e3g_1.length + ')';
|
|
414
2484
|
};
|
|
2485
|
+
function get_OUTGOING_CHANNEL_CAPACITY() {
|
|
2486
|
+
return OUTGOING_CHANNEL_CAPACITY;
|
|
2487
|
+
}
|
|
2488
|
+
var OUTGOING_CHANNEL_CAPACITY;
|
|
2489
|
+
//region block: post-declaration
|
|
2490
|
+
protoOf(DefaultWebSocketSessionImpl).n3c = send;
|
|
2491
|
+
defineProp(protoOf(FrameTooBigException), 'message', function () {
|
|
2492
|
+
return this.e();
|
|
2493
|
+
});
|
|
2494
|
+
protoOf(BoundedChannel).c1c = close$default;
|
|
2495
|
+
protoOf(BoundedChannel).e1c = cancel$default;
|
|
2496
|
+
//endregion
|
|
415
2497
|
//region block: init
|
|
416
2498
|
NonDisposableHandle_instance = new NonDisposableHandle();
|
|
2499
|
+
Companion_instance_4 = new Companion_4();
|
|
2500
|
+
OUTGOING_CHANNEL_CAPACITY = null;
|
|
417
2501
|
//endregion
|
|
418
2502
|
//region block: exports
|
|
419
2503
|
_.$_$ = _.$_$ || {};
|
|
420
|
-
_.$_$.a =
|
|
421
|
-
_.$_$.b =
|
|
422
|
-
_.$_$.c =
|
|
423
|
-
_.$_$.d =
|
|
424
|
-
_.$_$.e =
|
|
425
|
-
_.$_$.f =
|
|
426
|
-
_.$_$.g =
|
|
2504
|
+
_.$_$.a = Companion_getInstance;
|
|
2505
|
+
_.$_$.b = Companion_getInstance_2;
|
|
2506
|
+
_.$_$.c = Codes_CLOSED_ABNORMALLY_getInstance;
|
|
2507
|
+
_.$_$.d = Codes_NORMAL_getInstance;
|
|
2508
|
+
_.$_$.e = send;
|
|
2509
|
+
_.$_$.f = Binary_init_$Create$;
|
|
2510
|
+
_.$_$.g = Close_init_$Create$;
|
|
2511
|
+
_.$_$.h = Text_init_$Create$;
|
|
2512
|
+
_.$_$.i = CloseReason;
|
|
2513
|
+
_.$_$.j = DefaultWebSocketSession_0;
|
|
2514
|
+
_.$_$.k = DefaultWebSocketSession;
|
|
2515
|
+
_.$_$.l = WebSocketChannelsConfig;
|
|
2516
|
+
_.$_$.m = WebSocketExtensionsConfig;
|
|
2517
|
+
_.$_$.n = WebSocketExtension;
|
|
2518
|
+
_.$_$.o = WebSocketSession;
|
|
2519
|
+
_.$_$.p = from;
|
|
2520
|
+
_.$_$.q = parseWebSocketExtensions;
|
|
427
2521
|
//endregion
|
|
428
2522
|
return _;
|
|
429
|
-
}(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-coroutines-core.js'), require('./ktor-ktor-io.js'), require('./kotlinx-io-kotlinx-io-core.js')));
|
|
2523
|
+
}(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-coroutines-core.js'), require('./ktor-ktor-utils.js'), require('./ktor-ktor-io.js'), require('./kotlinx-io-kotlinx-io-core.js'), require('./kotlinx-atomicfu.js')));
|