DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

src/dw/comms/socketipc/doc_public/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 The following code snippet demonstrates the general structure of a server process receiving data:
6 
7 ```{.cpp}
8  dwSocketServer_initialize(...);
9 
10  dwSocketServer_accept(&connection, ...);
11  while(true)
12  {
13  // receive data from client
14  dwSocketConnection_read(&buffer, &buffer_size, timeout_us, connection);
15  }
16 ```
17 
18 The following code snippet demonstrates the general structure of a corresponding client process sending data:
19 
20 ```{.cpp}
21  dwSocketClient_initialize(...);
22 
23  dwSocketClient_connect(&connection, ...);
24  while(true)
25  {
26  // send data to server
27  dwSocketConnection_write(&buffer, &buffer_size, timeout_us, connection);
28  }
29 ```
30 This workflow is demonstrated in the following sample: @ref dwx_ipc_socketclientserver_sample.