| /samples/net/secure_mqtt_sensor_actuator/src/ |
| A D | mqtt_client.h | 20 int app_mqtt_init(struct mqtt_client *client); 25 void app_mqtt_connect(struct mqtt_client *client); 31 void app_mqtt_run(struct mqtt_client *client); 36 int app_mqtt_subscribe(struct mqtt_client *client); 41 int app_mqtt_publish(struct mqtt_client *client);
|
| A D | mqtt_client.c | 252 prepare_fds(client); in poll_mqtt_socket() 363 rc = poll_mqtt_socket(client, mqtt_keepalive_time_left(client)); in app_mqtt_process() 367 rc = mqtt_input(client); in app_mqtt_process() 380 rc = mqtt_live(client); in app_mqtt_process() 426 mqtt_input(client); in app_mqtt_connect() 430 mqtt_abort(client); in app_mqtt_connect() 470 mqtt_client_init(client); in app_mqtt_init() 471 client->broker = &broker; in app_mqtt_init() 474 client->client_id.size = strlen(client->client_id.utf8); in app_mqtt_init() 475 client->password = NULL; in app_mqtt_init() [all …]
|
| /samples/modules/thrift/hello/client/ |
| A D | sample.yaml | 2 description: Hello Thrift client sample 3 name: hello thrift client 19 sample.thrift.hello.client.binaryProtocol: {} 20 sample.thrift.hello.client.compactProtocol: 23 sample.thrift.hello.client.tlsTransport:
|
| A D | hello_client.py | 39 client = Hello.Client(protocol) 43 client.ping() 44 client.echo('Hello, world!') 49 client.counter()
|
| /samples/net/mqtt_publisher/src/ |
| A D | main.c | 341 mqtt_client_init(client); in client_init() 346 client->broker = &broker; in client_init() 350 client->password = NULL; in client_init() 351 client->user_name = NULL; in client_init() 416 client_init(client); in try_to_connect() 425 prepare_fds(client); in try_to_connect() 428 mqtt_input(client); in try_to_connect() 432 mqtt_abort(client); in try_to_connect() 451 rc = mqtt_input(client); in process_mqtt_and_sleep() 458 rc = mqtt_live(client); in process_mqtt_and_sleep() [all …]
|
| /samples/subsys/modbus/tcp_gateway/src/ |
| A D | main.c | 51 if (send(client, header, sizeof(header), 0) < 0) { in modbus_tcp_reply() 55 if (send(client, adu->data, adu->length, 0) < 0) { in modbus_tcp_reply() 62 static int modbus_tcp_connection(int client) in modbus_tcp_connection() argument 68 rc = recv(client, header, sizeof(header), MSG_WAITALL); in modbus_tcp_connection() 77 rc = recv(client, tmp_adu.data, data_len, MSG_WAITALL); in modbus_tcp_connection() 88 return modbus_tcp_reply(client, &tmp_adu); in modbus_tcp_connection() 129 int client; in main() local 132 client = accept(serv, (struct sockaddr *)&client_addr, in main() 135 if (client < 0) { in main() 146 rc = modbus_tcp_connection(client); in main() [all …]
|
| /samples/net/cloud/mqtt_azure/src/ |
| A D | main.c | 150 mqtt_client_init(client); in client_init() 155 client->broker = &broker; in client_init() 174 client->rx_buf = rx_buffer; in client_init() 176 client->tx_buf = tx_buffer; in client_init() 358 client_init(client); in try_to_connect() 360 rc = mqtt_connect(client); in try_to_connect() 366 prepare_fds(client); in try_to_connect() 370 mqtt_abort(client); in try_to_connect() 374 mqtt_input(client); in try_to_connect() 377 subscribe(client); in try_to_connect() [all …]
|
| /samples/net/tftp_client/src/ |
| A D | tftp-client.c | 18 static struct tftpc client; variable 57 memcpy(&client.server, &remote_addr, sizeof(client.server)); in tftp_init() 59 client.callback = tftp_event_callback; in tftp_init() 77 ret = tftp_get(&client, "file1.bin", "octet"); in main() 86 ret = tftp_put(&client, "newfile.bin", "octet", in main()
|
| /samples/net/sockets/echo_service/src/ |
| A D | main.c | 58 int client = pfd->fd; in receive_data() local 64 len = recvfrom(client, buf, buflen, 0, in receive_data() 72 if (!is_udp && sockfd_tcp[0].fd == client) { in receive_data() 80 close(client); in receive_data() 91 out_len = sendto(client, p, len, 0, in receive_data() 94 out_len = send(client, p, len, 0); in receive_data() 212 int client; in main() local 214 client = accept(tcp_sock, (struct sockaddr *)&client_addr, in main() 216 if (client < 0) { in main() 223 LOG_INF("Connection #%d from %s (%d)", counter++, addr_str, client); in main() [all …]
|
| /samples/subsys/ipc/openamp_rsc_table/ |
| A D | README.rst | 30 Running the client sample 58 [ 45.158822] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.1024: goodbye! 59 [ 45.159741] virtio_rpmsg_bus virtio0: destroying channel rpmsg-client-sample addr 0x400 60 …[ 45.160856] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.1024: rpmsg sample client driver… 75 OpenAMP[remote] Linux sample client responder started 78 [Linux sample client] incoming msg 1: hello world! 79 [Linux sample client] incoming msg 2: hello world! 81 [Linux sample client] incoming msg 99: hello world! 82 [Linux sample client] incoming msg 100: hello world! 83 OpenAMP Linux sample client responder ended [all …]
|
| /samples/net/tftp_client/ |
| A D | sample.yaml | 2 description: Test TFTP client get and put methods 3 name: TFTP client sample app
|
| A D | README.rst | 1 .. zephyr:code-sample:: tftp-client 2 :name: TFTP client 5 Use the TFTP client library to get/put files from/to a TFTP server. 13 This TFTP client sample application for Zephyr implements the TFTP client library 34 Build the tftp-client sample application like this: 47 Build the tftp-client sample application for :ref:`native_sim <native_sim>` like this: 90 <inf> net_tftp_client_app: Run TFTP client 94 <inf> net_tftp_client_app: TFTP client get done 95 <inf> net_tftp_client_app: TFTP client put done
|
| /samples/net/sockets/echo/src/ |
| A D | socket_echo.c | 78 int client = accept(serv, (struct sockaddr *)&client_addr, in main() local 81 if (client < 0) { in main() 92 int len = recv(client, buf, sizeof(buf), 0); in main() 104 out_len = send(client, p, len, 0); in main() 115 close(client); in main()
|
| /samples/net/sockets/dumb_http_server/src/ |
| A D | socket_dumb_http.c | 86 int client = accept(serv, (struct sockaddr *)&client_addr, in main() local 88 if (client < 0) { in main() 105 r = recv(client, &c, 1, 0); in main() 135 int sent_len = send(client, data, len, 0); in main() 146 ret = close(client); in main()
|
| /samples/subsys/modbus/tcp_server/src/ |
| A D | main.c | 219 if (send(client, header, sizeof(header), 0) < 0) { in modbus_tcp_reply() 223 if (send(client, adu->data, adu->length, 0) < 0) { in modbus_tcp_reply() 230 static int modbus_tcp_connection(int client) in modbus_tcp_connection() argument 236 rc = recv(client, header, sizeof(header), MSG_WAITALL); in modbus_tcp_connection() 245 rc = recv(client, tmp_adu.data, data_len, MSG_WAITALL); in modbus_tcp_connection() 261 return modbus_tcp_reply(client, &tmp_adu); in modbus_tcp_connection() 307 int client; in main() local 310 client = accept(serv, (struct sockaddr *)&client_addr, in main() 313 if (client < 0) { in main() 324 rc = modbus_tcp_connection(client); in main() [all …]
|
| /samples/bluetooth/iso_central/ |
| A D | sample.yaml | 2 description: Bluetooth ISO central (client) sample 3 name: Bluetooth ISO central (client) sample
|
| /samples/net/sockets/dumb_http_server_mt/src/ |
| A D | main.c | 199 int client; in client_conn_handler() local 204 client = *sock; in client_conn_handler() 210 received = recv(client, buf, sizeof(buf), 0); in client_conn_handler() 218 LOG_ERR("[%d] Connection error %d", client, ret); in client_conn_handler() 244 (void)sendall(client, content, sizeof(content)); in client_conn_handler() 247 (void)close(client); in client_conn_handler() 269 int client; in process_tcp() local 276 if (client < 0) { in process_tcp() 285 close(client); in process_tcp() 289 accepted[slot] = client; in process_tcp() [all …]
|
| /samples/subsys/modbus/tcp_server/ |
| A D | README.rst | 24 The user can of course try out other client implementations with this sample. 40 On the client side, PC or laptop, the following command connects PyModbus 52 > client.connect 53 > client.write_coil address=0 value=1 slave=1 68 > client.write_coils address=0 values=0,1,1 slave=1 74 > client.read_coils address=0 count=3 slave=1 96 > client.write_register address=0 value=42 slave=1 102 > client.write_registers address=0 values=42,42,42 slave=1 108 > client.read_holding_registers address=0 count=3 slave=1
|
| /samples/net/openthread/coap/ |
| A D | README.rst | 2 :name: OpenThread CoAP client and server application 5 Build a Full Thread Device (FTD) CoAP server and client. 11 It can be built to work as a server or as a client. 47 Build the OpenThread FTD CoAP client sample application like this: 52 :west-args: -T sample.net.openthread.ftd.coap.client 66 Example building CoAP client for the cc1352p7 launchpad: 72 :west-args: -T sample.net.openthread.ftd.coap.client 89 Once Thread network is operational, you could start using client. 91 Controlling server board's LED using a button on client board 159 To do that, let's use aiocoap-client, a tool written in python. [all …]
|
| /samples/modules/thrift/hello/client/src/ |
| A D | main.cpp | 115 HelloClient client(protocol); in main() local 119 client.ping(); in main() 121 client.echo(s, "Hello, world!"); in main() 123 client.counter(); in main()
|
| /samples/net/sockets/echo_async/src/ |
| A D | socket_echo.c | 202 int client = accept(fd, (struct sockaddr *)&client_addr, in main() local 206 if (client < 0) { in main() 213 addr_str, client); in main() 214 if (pollfds_add(client) < 0) { in main() 217 res = send(client, msg, sizeof(msg) - 1, 0); in main() 221 close(client); in main() 223 setblocking(client, false); in main()
|
| /samples/net/sockets/http_client/ |
| A D | Kconfig | 1 # Private config options for http-client sample app 6 mainmenu "Networking http-client sample application"
|
| /samples/drivers/video/tcpserversink/src/ |
| A D | main.c | 39 int i, ret, sock, client; in main() local 112 client = accept(sock, (struct sockaddr *)&client_addr, &client_addr_len); in main() 113 if (client < 0) { in main() 146 ret = sendall(client, vbuf->buffer, vbuf->bytesused); in main() 150 close(client); in main()
|
| /samples/net/dhcpv4_client/ |
| A D | README.rst | 1 .. zephyr:code-sample:: dhcpv4-client 2 :name: DHCPv4 client 5 Start a DHCPv4 client to obtain an IPv4 address from a DHCPv4 server. 10 This application starts a DHCPv4 client, gets an IPv4 address from the 22 Running DHCPv4 client in Linux Host 81 Once DHCPv4 client address negotiation completed with server, details 86 [00:00:00.000,000] <inf> net_dhcpv4_client_sample: Run dhcpv4 client 94 To verify the Zephyr application client is running and has received 173 Once DHCPv4 client address negotiation completed with server, details 187 To verify the Zephyr application client is running and has received [all …]
|
| /samples/subsys/modbus/tcp_gateway/ |
| A D | README.rst | 24 The user can of course try out other client implementations with this sample. 44 On the client side, PC or laptop, the following command connects PyModbus 56 > client.connect 57 > client.write_coil address=0 value=1 slave=1 72 > client.write_coils address=0 values=0,1,1 slave=1 78 > client.read_coils address=0 count=3 slave=1 100 > client.write_register address=0 value=42 slave=1 106 > client.write_registers address=0 values=42,42,42 slave=1 112 > client.read_holding_registers address=0 count=3 slave=1
|