Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AlexZhouAA opened this issue Sep 30, 2015 · 1 comment
Open

Comments

@AlexZhouAA
Copy link

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

@larssn
Copy link

larssn commented Nov 1, 2016

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants