-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support CIO server for wasm-js and js #4466
Open
whyoleg
wants to merge
29
commits into
ktorio:3.1.0-eap
Choose a base branch
from
whyoleg:commonize-cio-server
base: 3.1.0-eap
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
0ace38a
KTOR-7606 Make Closable implement AutoCloseable (#4414)
osipxd 7ad9e11
KTOR-7586 Improve parsing of supported media types (#4410)
anton-erofeev bc84a72
Version 3.1.0-SNAPSHOT
osipxd 66e55da
KTOR-7586 Fix MimesTest doesn't compile on JS target (#4438)
osipxd dd34245
KTOR-6004 Support TCP and Unix socket for wasm-js and js via NodeJS (…
whyoleg 0136f42
KTOR-7663 Add `bind` overload for UDPSocketBuilder (#4456)
marychatte 578aa5b
KTOR-7675 Support CIO client for wasm-js and js (#4441)
whyoleg 9a083c7
KTOR-7620 Make Url class @Serializable and JVM Serializable (#4421)
wkornewald 2958e5d
KTOR-6632 Support receiving multipart data with Ktor client (#4458)
e5l 8714615
KTOR-7435 Add serialization for SSE (#4363)
marychatte 4d196e1
Update dependency io.micrometer:micrometer-core to v1.14.1 (#4472)
renovate[bot] 394a752
Use static libcurl build with conan (#4445)
whyoleg 8140fc0
KTOR-7644 Make re-auth status codes configurable (#4420)
wkornewald 11539a0
KTOR-7679 Allow disabling body decoding on server (#4444)
e5l beaa057
KTOR-7359 Implement a suspending version of EmbeddedServer.start and …
whyoleg 9d91d6e
KTOR-7470 receiveMultipart throw UnsupportedMediaTypeException (#4339)
stokado ac2f544
KTOR-7722 content negotiation client accept header control (#4462)
rocketraman e1f483e
KTOR-7845 Fix for threading issue in flushAndClose for reader job cha…
bjhham 8886660
Make server-test-host depend on cio in common
whyoleg b6a1fdc
Move WebSocketEngineSuite to common
whyoleg d37a0d1
Expose test-base from test-suites to have access to it in server-cio …
whyoleg d418179
CIO server Js/WasmJs support
whyoleg f321767
WIP: fix CIO server tests for web
whyoleg 03eccba
fix style
whyoleg 7b7dc8c
Revert "WIP: fix CIO server tests for web"
whyoleg 590889f
move socket address util to nonJvm
whyoleg 84a1e44
Explicitly use CIO in js/wasmJs server tests
whyoleg 0306e76
Drop delays
whyoleg 693399c
[DROP IT] Increase JS tests timeout
whyoleg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// Klib ABI Dump | ||
// Targets: [androidNativeArm32, androidNativeArm64, androidNativeX64, androidNativeX86, iosArm64, iosSimulatorArm64, iosX64, linuxArm64, linuxX64, macosArm64, macosX64, mingwX64, tvosArm64, tvosSimulatorArm64, tvosX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64, watchosX64] | ||
// Targets: [androidNativeArm32, androidNativeArm64, androidNativeX64, androidNativeX86, iosArm64, iosSimulatorArm64, iosX64, js, linuxArm64, linuxX64, macosArm64, macosX64, mingwX64, tvosArm64, tvosSimulatorArm64, tvosX64, wasmJs, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64, watchosX64] | ||
// Rendering settings: | ||
// - Signature version: 2 | ||
// - Show manifest properties: true | ||
|
@@ -62,3 +62,7 @@ final object io.ktor.client.engine.cio/CIO : io.ktor.client.engine/HttpClientEng | |
} | ||
|
||
final fun (io.ktor.client.engine.cio/CIOEngineConfig).io.ktor.client.engine.cio/endpoint(kotlin/Function1<io.ktor.client.engine.cio/EndpointConfig, kotlin/Unit>): io.ktor.client.engine.cio/EndpointConfig // io.ktor.client.engine.cio/endpoint|[email protected](kotlin.Function1<io.ktor.client.engine.cio.EndpointConfig,kotlin.Unit>){}[0] | ||
|
||
// Targets: [js] | ||
final val io.ktor.client.engine.cio/initHook // io.ktor.client.engine.cio/initHook|{}initHook[0] | ||
final fun <get-initHook>(): dynamic // io.ktor.client.engine.cio/initHook.<get-initHook>|<get-initHook>(){}[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# | ||
# Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. | ||
# | ||
target.js.browser=false | ||
target.wasmJs.browser=false |
18 changes: 18 additions & 0 deletions
18
ktor-client/ktor-client-cio/js/src/io/ktor/client/engine/cio/Loader.js.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
package io.ktor.client.engine.cio | ||
|
||
import io.ktor.client.engine.* | ||
import io.ktor.util.* | ||
import io.ktor.utils.io.* | ||
|
||
@Suppress("DEPRECATION") | ||
@OptIn(ExperimentalStdlibApi::class, ExperimentalJsExport::class, InternalAPI::class) | ||
@Deprecated("", level = DeprecationLevel.HIDDEN) | ||
@JsExport | ||
@EagerInitialization | ||
public val initHook: dynamic = run { | ||
if (PlatformUtils.IS_NODE) engines.append(CIO) | ||
} |
8 changes: 0 additions & 8 deletions
8
ktor-client/ktor-client-cio/jvm/src/io/ktor/client/engine/cio/LoaderJvm.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've increased timeout for JS tests here, as I have no idea from where the issue in JS engine comming :)
For some reason, the behavior in Js/WasmJs differs here - I can't understand if it's the issue in
ktor-network
implementation or in some expect-actual, or in some other thing...