Lines Matching refs:client
137 client_t* client = (client_t*)osi_calloc(sizeof(client_t)); in accept_ready() local
139 client->socket = socket; in accept_ready()
141 if (!list_append(clients, client)) { in accept_ready()
143 client_free(client); in accept_ready()
147 socket_register(socket, thread_get_reactor(thread), client, read_ready, NULL); in accept_ready()
154 client_t* client = (client_t*)context; in read_ready() local
157 socket_read(client->socket, client->buffer + client->buffer_size, in read_ready()
158 sizeof(client->buffer) - client->buffer_size); in read_ready()
160 list_remove(clients, client); in read_ready()
163 client->buffer_size += ret; in read_ready()
165 while (client->buffer_size > 3) { in read_ready()
166 uint8_t* buffer = client->buffer; in read_ready()
171 if (client->buffer_size < frame_len) break; in read_ready()
190 size_t remainder = client->buffer_size - frame_len; in read_ready()
192 client->buffer_size -= frame_len; in read_ready()
199 client_t* client = (client_t*)ptr; in client_free() local
200 socket_free(client->socket); in client_free()
201 osi_free(client); in client_free()