Skip to content

Commit

Permalink
doc: Replace echo.websocket.org -> ws.ifelse.io (#4265)
Browse files Browse the repository at this point in the history
  • Loading branch information
SpyrosKou authored May 8, 2023
1 parent ece6aa9 commit 135d644
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static void main(String[] args) throws Exception {

CompletionStage<List<String>> result =
Http.get(system).singleWebSocketRequest(
WebSocketRequest.create("ws://echo.websocket.org"),
WebSocketRequest.create("ws://ws.ifelse.io"),
echoClient,
materializer
).second();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import scala.concurrent.Future
import scala.util.{ Failure, Success }

/**
* An example App that runs a quick test against the websocket server at wss://echo.websocket.org
* An example App that runs a quick test against the websocket server at wss://ws.ifelse.io
*/
object EchoTestClientApp extends App {
implicit val system: ActorSystem = ActorSystem()
Expand Down Expand Up @@ -52,7 +52,7 @@ object EchoTestClientApp extends App {

def echoClient = Flow.fromSinkAndSourceMat(sink, source)(Keep.left)

val (upgrade, res) = Http().singleWebSocketRequest("wss://echo.websocket.org", echoClient)
val (upgrade, res) = Http().singleWebSocketRequest("wss://ws.ifelse.io", echoClient)
res onComplete {
case Success(res) =>
println("Run successful. Got these elements:")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void testSingleWebSocketRequest() {

final Pair<CompletionStage<WebSocketUpgradeResponse>, CompletionStage<Done>> pair =
http.singleWebSocketRequest(
WebSocketRequest.create("ws://echo.websocket.org"),
WebSocketRequest.create("ws://ws.ifelse.io"),
flow,
materializer
);
Expand Down Expand Up @@ -205,7 +205,7 @@ public void testWebSocketClientFlow() {


Flow<Message, Message, CompletionStage<WebSocketUpgradeResponse>> webSocketFlow =
http.webSocketClientFlow(WebSocketRequest.create("ws://echo.websocket.org"));
http.webSocketClientFlow(WebSocketRequest.create("ws://ws.ifelse.io"));


Pair<CompletionStage<WebSocketUpgradeResponse>, CompletionStage<Done>> pair =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ object SingleWebSocketRequest {
// completes or fails when the connection succeeds or fails
// and closed is a Future[Done] representing the stream completion from above
val (upgradeResponse, closed) =
Http().singleWebSocketRequest(WebSocketRequest("ws://echo.websocket.org"), flow)
Http().singleWebSocketRequest(WebSocketRequest("ws://ws.ifelse.io"), flow)

val connected = upgradeResponse.map { upgrade =>
// just like a regular http request we can access response status which is available via upgrade.response.status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ object WebSocketClientFlow {
val outgoing = Source.single(TextMessage("hello world!"))

// flow to use (note: not re-usable!)
val webSocketFlow = Http().webSocketClientFlow(WebSocketRequest("ws://echo.websocket.org"))
val webSocketFlow = Http().webSocketClientFlow(WebSocketRequest("ws://ws.ifelse.io"))

// the materialized value is a tuple with
// upgradeResponse is a Future[WebSocketUpgradeResponse] that
Expand Down

0 comments on commit 135d644

Please sign in to comment.