blocshop/sockets-for-cordova

How to destroy a socket? If a socket is closed, can I open it later?

Opened this issue · 1 comments

Please help me with the above two questions.
Thanks a lot.

Yeah if the socket state is "closed", you need to do another open().

Won't advise destroying sockets, the plugin doesn't appear to be built around that being possible.
But if you're feeling brave, you could just:
var sock = new Socket();
sock.open( ... );
// "destroy"
sock = null;
// or simply
// socket = new Socket();

Edit:
Just realized this is one year old...