Closed puyansaraei closed 10 months ago
I can connect to flash socket.io
server:
from flask import Flask, render_template
from flask_socketio import SocketIO, emit
app = Flask(__name__)
app.config['SECRET_KEY'] = 'secret!'
socketio = SocketIO(app)
@socketio.event
def my_event(message):
emit('my response', {'data': 'got it!'})
if __name__ == '__main__':
socketio.run(app)
client:
var uri = new Uri("http://127.0.0.1:5000");
var socket = new SocketIO(uri);
socket.OnConnected += (sender, e) =>
{
Console.WriteLine("Connected " + socket.Namespace);
};
await socket.ConnectAsync();
Hello,
I want, with your class library, to establish a connection to a "flask_socketio server".
The connection to the socket server is also established. The communication between server and client works. But the "ConnectAsync()" still throws a "TimeOut-Exception".
Because of this, the "Connected" and "sid" values do not update.
Does your client expect a response from server to know if the connection is established?