Flutter socket io does not listen to emit event from the server - socket.io

Flutter socket io does not listen to an emit event from the server after disconnecting and connecting. When connecting for the first time it works fine, after socket disconnecting and connecting is when it does not listen to an emit event from the server though it can send an event to the server and other clients can see it from the same room.

Related

How handle socket io reconnect issue from server side?

Socket disconnect and reconnect with new socket id.
How to handle it from server side.
Is there possibility server configuration not match with socket.io
Socket disconnect and reconnect with new socket id.
How to handle it from server side.
Is there possibility server configuration not match with socket.

incomingmessages not received by broker and mqttclient but in wireshark its present

problem is that im not receiving messages from mqtt client running on a device.
i have a hardware device. on this device there is a mqtt client.
what i did:
i connected this device with laptop running mqtt broker mosquito and jmeter with mqtt plugin as client listening on 1883 port.
i tried: i have added rules in windows firewall for inbound and outbound opened port 1883.
now if i check in wireshark on laptop i see device sending messages to connect broker. from ipadress of device connect messages sent to ipadress of laptop at port 1883. it was expected that broker will send messages back to device but as no messages received by broker so no messages sent from broker to device.
neither i get messages in jmeter subscriber.
i tried: i installed mqtt client "mqttlens" locally on laptop. connection tested with broker and it works. so broker is ok.
can someone help

Does mosquitto broker send disconnect message upon shutdown?

I am using MQTT broker configured on a host machine with Windows 2012 server OS and a few embedded devices are subscribed to broker to receive commands.
I wanted to understand , does MQTT broker send any disconnect message to all its subscribed clients when the broker service on host machine stops because of any reason like the host machine is rebooted or shutdown. The reason I ask this question is below.
On my device, all the code (including mqtt client library)stops executing when device goes to sleep, and execution does not resume until device is woken up (by receiving data packet on WiFi channel or by a few other actions).
Now when I reboot the host machine, I am observing that my devices are waking up from sleep and are trying to reconnect to broker until MQTT broker is coming back. I think the devices are waking up only because they are receiving some data over WiFi channel because I am not taking any other action which could wake up the device.
So I am wondering what is that WiFi data packet that is waking up the device and causing the device to reconnect. Is it probably a disconnect command sent by Broker to the device?
No, the broker will not send any messages on shutdown. The MQTT Disconnect Message is only sent from the client to broker according to the spec.
I suggest you install some network monitoring software (e.g. Wireshark) to track what network activity is happening.

socket.io listen to ping events on the server

I'm using socket.io v.1.4.5.
Is there no easy way to listen to the pings a socket.io server receives from connected sockets. I'm talking about the automatic, shockingly undocumented pings/heartbeats socket.io sends and receives (the interval of which, you can change with pingInterval). On the client, I can listen to the ping backs from the server with socket.on('pong') but not on the server.
Do I really need to create my own ping and pong events and run them on top of the ones socket.io automatically sends to have event handlers on both the server and client side?

socket.io - Client socket time out

Socket.io has connection and disconnect events.
Does socket.io has timeout event for client sockets, that are already connected?
https://github.com/socketio/socket.io

Resources