WebSockets

Estimated reading time: 1 minute

WebSocket を用いてサーバ間と双方向通信を行う機能を提供しています。 詳細は専用の WebSocket のページを参照してください。

This feature is defined in the method io.ktor.client.features.websocket.ws in the artifact io.ktor:ktor-client-websockets:$ktor_version.
dependencies { implementation "io.ktor:ktor-client-websockets:$ktor_version" }
dependencies { implementation("io.ktor:ktor-client-websockets:$ktor_version") }
<project> ... <dependencies> <dependency> <groupId>io.ktor</groupId> <artifactId>ktor-client-websockets</artifactId> <version>${ktor.version}</version> <scope>compile</scope> </dependency> </dependencies> </project>
dependencies { implementation "io.ktor:ktor-client-websockets-jvm:$ktor_version" }
dependencies { implementation("io.ktor:ktor-client-websockets-jvm:$ktor_version") }
<project> ... <dependencies> <dependency> <groupId>io.ktor</groupId> <artifactId>ktor-client-websockets-jvm</artifactId> <version>${ktor.version}</version> <scope>compile</scope> </dependency> </dependencies> </project>
dependencies { implementation "io.ktor:ktor-client-websockets-native:$ktor_version" }
dependencies { implementation("io.ktor:ktor-client-websockets-native:$ktor_version") }
<project> ... <dependencies> <dependency> <groupId>io.ktor</groupId> <artifactId>ktor-client-websockets-native</artifactId> <version>${ktor.version}</version> <scope>compile</scope> </dependency> </dependencies> </project>
dependencies { implementation "io.ktor:ktor-client-websockets-js:$ktor_version" }
dependencies { implementation("io.ktor:ktor-client-websockets-js:$ktor_version") }
<project> ... <dependencies> <dependency> <groupId>io.ktor</groupId> <artifactId>ktor-client-websockets-js</artifactId> <version>${ktor.version}</version> <scope>compile</scope> </dependency> </dependencies> </project>