PrismarineJS/prismarine-viewer

Close headless socket connection

rogermiranda1000 opened this issue · 3 comments

In #141 there was implemented a way to close the server (ref), but this is not available on the headless mode while using sockets. The connection gets created here, and cannot be destroyed.

what is the question here?

what is the question here?

How do I destroy the socket (in headless mode)

client is returned by the function creating the headless mode so you should be able to call .end() on it https://nodejs.org/api/net.html#socketenddata-encoding-callback