| 460 | } |
| 461 | |
| 462 | void xs_socket_close(xsMachine *the) |
| 463 | { |
| 464 | xsSocket xss = xsmcGetHostData(xsThis); |
| 465 | |
| 466 | if (NULL == xss) |
| 467 | return; |
| 468 | |
| 469 | xsmcGetHostDataValidate(xsThis, xs_socket_destructor); |
| 470 | |
| 471 | xsmcSetHostDestructor(xsThis, NULL); |
| 472 | xsmcSetHostData(xsThis, NULL); |
| 473 | xsForget(xss->obj); |
| 474 | |
| 475 | closeSocket(xss); |
| 476 | |
| 477 | if (!(xss->pending & kPendingClose)) |
| 478 | socketSetPending(xss, kPendingClose); |
| 479 | |
| 480 | if (xss->connecting) { |
| 481 | xss->connecting = 0; |
| 482 | socketDownUseCount(the, xss); |
| 483 | } |
| 484 | } |
| 485 | |
| 486 | void xs_socket_get(xsMachine *the) |
| 487 | { |
nothing calls this directly
no test coverage detected