Пример #1
0
void
ServerSocket_destroy(ServerSocket socket)
{
    closeAndShutdownSocket(socket->fd);

    free(socket);
}
Пример #2
0
void
Socket_destroy(Socket socket)
{
    closeAndShutdownSocket(socket->fd);

    /* Wait for other threads to realize that the socket has been closed */
    Thread_sleep(100);

    free(socket);
}
Пример #3
0
void
Socket_destroy(Socket self)
{
    int fd = self->fd;

    self->fd = -1;

    closeAndShutdownSocket(fd);

    Thread_sleep(10);

    free(self);
}
Пример #4
0
void
Socket_destroy(Socket self)
{
    int fd = self->fd;

    self->fd = -1;

    closeAndShutdownSocket(fd);

    Thread_sleep(10);

    GLOBAL_FREEMEM(self);
}