Open abenz1267 opened 10 years ago
you want to close connection from client or server side?
Wanted to close from client side. Doesn't matter anymore. Not using this bundle anymore ... using only Ratchet now. Way less hassle at the end of the day.
so u think that bundle is useless and its better to implement rachet without it?
At least i have way less problems since i did it. ZeroMQ implementation without a problem etc. ...and also finding support on the www seems to be way easier. Literally every problem i had with this bundle got solved by ....not using it.
thx mate, I think I will go this way also do u know maybe other way then ZMQ to make a call to ws rachet server from php? some way not requiring installing extra php extension...? I use this lib https://github.com/bazo/wamp-client but it does not support receiving response from server
Hm, no..don't know. Sorry. I can't recommend using shared hosting anyways. At least get a vServer, so u can install whatever you need.
I can easily close the connection from client side by using clankSession.close(); of this bundle.
To access clankSession global variable in javascript, see https://github.com/JDare/ClankBundle/issues/19#issuecomment-51613870
Hi, i need to do that server side but in my service with the disconnect event listener, i dont have access to the topic to call its unsubscribe function. Anyone can help me ? I dont how to communicate to the topic by the connection interface only...
@julienfroidefond better try to switch to https://github.com/GeniusesOfSymfony/WebSocketBundle - its based on clank
@Venzon thx ! I just migrate. I ll try to do the same but it seems in fact better than clank. Thx for the advice. Why there isn't no messages about that repo in the readme ?
@Venzon : All is ok for me with the gos bundle. Thx again; it's a really amazing time saver work !
@julienfroidefond I am glad I could help, cheers m8
Well, how to close a connection without reloading the page? F.e:
$(document).ready(function(){
clank.close(); });
Or something like that. Is it possible to close the connection (without reloading/closing browser )?
Regards