I'm trying to receive pushes from the server as a client; using my test client as follows:
Client:
socket_client = socketio.test_client(app)
@socketio.on('hit_client')
def recieve_message(json_data):
print("Server has called!")
Server:
socketio.emit('hit_client', 'Hi Client!')
The server should be pushing and calling the hit_client
channel, but that isn't being fired. However, the socket_client.get_received()
has the emitted data. I thought the whole point of WebSockets was bidirectional communication (i.e. pushing function triggers)!
This is a very simple setup and it doesn't even seem to be working... Any help would be EXTREMELY appreciated. I've been slamming my head for hours.