Handshake response not received

So, im trying to make thing, that will send data from my laptop to the android phone. First of all im trying to connect to the server, i made server using Python, then, i made java class, that had to connect to the server, but when im trying - i get “Handshake response not received.” after few seconds of trying connection. What am i doing wrong?!

Repl link:
idk what meant by repl link, so i’ll put this https://gameplaytogether.akkdliasierva.repl.co

import asyncio
import websockets

async def server(websocket, path):
    while True:
        message = await websocket.recv()
        print(f"Received message: {message}")
        response = f"Hello from the server! You said: {message}"
        await websocket.send(response)

start_server = websockets.serve(server, "", 8000)

loop = asyncio.new_event_loop()

import org.json.JSONObject;
import javax.websocket.*;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.concurrent.CountDownLatch;

public class ServerConnection {
    private static CountDownLatch latch;

    private String url;

    public ServerConnection(String url)
        this.url = url;

    public void onOpen(Session session) {
        System.out.println("Connected to server");

    public void onMessage(String message) {
        System.out.println("Received message: " + message);

    public void onClose(Session session, CloseReason closeReason) {
        System.out.println("Session closed: " + closeReason.getReasonPhrase());

    public boolean start()

        latch = new CountDownLatch(1);

        try {
            WebSocketContainer container = ContainerProvider.getWebSocketContainer();
            String uri = "wss://gameplaytogether.akkdliasierva.repl.co";// did it for debug
            container.connectToServer(this, URI.create(uri));
            return true;
        } catch (Exception e) {
            return false;