DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

comms/socketipc/docs/usecase1.md
Go to the documentation of this file.
1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
2 
3 @page ipc_usecase1 IPC Workflow
4 
5 @note SW Release Applicability: This tutorial is applicable to modules in both **NVIDIA DriveWorks** and **NVIDIA DRIVE Software** releases.
6 
7 The following code snippet demonstrates the general structure of a server process receiving data:
8 
9 ```{.cpp}
10  dwSocketServer_initialize(...);
11 
12  dwSocketServer_accept(&connection, ...);
13  while(true)
14  {
15  // receive data from client
16  dwSocketConnection_read(&buffer, &buffer_size, timeout_us, connection);
17  }
18 ```
19 
20 The following code snippet demonstrates the general structure of a corresponding client process sending data:
21 
22 ```{.cpp}
23  dwSocketClient_initialize(...);
24 
25  dwSocketClient_connect(&connection, ...);
26  while(true)
27  {
28  // send data to server
29  dwSocketConnection_write(&buffer, &buffer_size, timeout_us, connection);
30  }
31 ```
32 This workflow is demonstrated in the following sample: @ref dwx_ipc_socketclientserver_sample.