Lines Matching refs:len
68 static void telnet_command_send_reply(uint8_t *msg, uint16_t len) in telnet_command_send_reply() argument
74 while (len > 0) { in telnet_command_send_reply()
77 ret = zsock_send(sh_telnet->fds[SOCK_ID_CLIENT].fd, msg, len, 0); in telnet_command_send_reply()
85 len -= ret; in telnet_command_send_reply()
165 sh_telnet->line_out.len = 0; in telnet_reply_command()
188 uint16_t len = sh_telnet->line_out.len; in telnet_send() local
190 if (sh_telnet->line_out.len == 0) { in telnet_send()
198 while (len > 0) { in telnet_send()
199 ret = zsock_send(sh_telnet->fds[SOCK_ID_CLIENT].fd, msg, len, in telnet_send()
205 memmove(sh_telnet->line_out.buf, msg, len); in telnet_send()
206 sh_telnet->line_out.len = len; in telnet_send()
218 len -= ret; in telnet_send()
222 sh_telnet->line_out.len = 0; in telnet_send()
273 size_t len, off, buf_left, cmd_total_len; in telnet_recv() local
299 len = ret; in telnet_recv()
302 while (off < len) { in telnet_recv()
350 len -= cmd_total_len; in telnet_recv()
353 memmove(buf + off, buf + data_off, len); in telnet_recv()
363 len -= cmd_total_len; in telnet_recv()
366 if (len == 0) { in telnet_recv()
371 sh_telnet->rx_len += len; in telnet_recv()
435 sh_telnet->line_out.len = 0; in telnet_accept()
692 if (lb->len + length - *cnt > TELNET_LINE_SIZE) { in telnet_write()
693 copy_len = TELNET_LINE_SIZE - lb->len; in telnet_write()
698 memcpy(lb->buf + lb->len, (uint8_t *)data + *cnt, copy_len); in telnet_write()
699 lb->len += copy_len; in telnet_write()
704 if (lb->buf[lb->len - 1] == '\n' || in telnet_write()
705 lb->len == TELNET_LINE_SIZE) { in telnet_write()
721 if (lb->len > 0) { in telnet_write()