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