| 279 | } |
| 280 | |
| 281 | void doClose(xsMachine *the, xsSlot *instance) |
| 282 | { |
| 283 | TCP tcp = xsmcGetHostData(*instance); |
| 284 | if (tcp && xsmcGetHostDataValidate(*instance, (void *)&xsTCPHooks)) { |
| 285 | tcp->ready = false; |
| 286 | |
| 287 | removeTCPCallbacks(tcp); |
| 288 | tcp->triggerable = 0; |
| 289 | |
| 290 | xsmcSetHostData(*instance, NULL); |
| 291 | xsForget(tcp->obj); |
| 292 | xsmcSetHostDestructor(*instance, NULL); |
| 293 | atomic_set(&tcp->triggered, 0); |
| 294 | tcpRelease(tcp); |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | void xs_tcp_close(xsMachine *the) |
| 299 | { |
no test coverage detected