emit the event on behalf of the client #1105
Replies: 3 comments 10 replies
-
I'm not sure I understand what you want to do. A server cannot emit on behalf of a client. Your s1 server can directly emit to clients. Your s2 server (assuming you configure it as an auxiliary process) can also emit to clients, indirectly through s1. Another confusing aspect of your description is that you want to emit a disconnect event, but Socket.IO has no such thing. If you want to remove a client, then the server can disconnect it, but this isn't done with the emit function, there is a disconnect function for this. |
Beta Was this translation helpful? Give feedback.
-
Hi, usually the client's(front-end) connection is idle(no response from frontend) for some time(idle more than 15 minutes(because a long idle connection is consuming RAM))), so I want to emit a disconnect event to close the idle connection from s2 to s1.
|
Beta Was this translation helpful? Give feedback.
-
ok,
i tried from django shell(s2)
Because s2 did not close the s1 connection, the socket connection is still not disconnected. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm using a socket. io WSGIApp, eventlet, and RedisManager (public Redis url) as the first server (S1 is running fine). Now that I have another Django server (separate isolated server s2), I need to emit a disconnect event on behalf of the client to my first server (s1) from s2, using the sid that I saved in the database,i blocked that sid and I need to disconnect. How do you do that?
Beta Was this translation helpful? Give feedback.
All reactions