Loading [MathJax]/extensions/tex2jax.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>

  • DriveWorks SDK Reference
    5.20.37 Release
    For Test and Development only

    All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    SocketClientServer.h
    Go to the documentation of this file.
    1
    2//
    3// Notice
    4// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
    5// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
    6// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
    7// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
    8//
    9// NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
    10// information or for any infringement of patents or other rights of third parties that may
    11// result from its use. No license is granted by implication or otherwise under any patent
    12// or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
    13// expressly authorized by NVIDIA. Details are subject to change without notice.
    14// This code supersedes and replaces all information previously supplied.
    15// NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
    16// components in life support devices or systems without express written approval of
    17// NVIDIA CORPORATION & AFFILIATES.
    18//
    19// SPDX-FileCopyrightText: Copyright (c) 2016-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
    20// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
    21//
    22// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
    23// property and proprietary rights in and to this material, related
    24// documentation and any modifications thereto. Any use, reproduction,
    25// disclosure or distribution of this material and related documentation
    26// without an express license agreement from NVIDIA CORPORATION or
    27// its affiliates is strictly prohibited.
    28//
    30
    46#ifndef DW_IPC_SOCKETCLIENTSERVER_H_
    47#define DW_IPC_SOCKETCLIENTSERVER_H_
    48
    49#include <dw/core/base/Config.h>
    52#include <dw/core/base/Status.h>
    53#include <dw/core/base/Types.h>
    54
    55#ifdef __cplusplus
    56extern "C" {
    57#endif
    58
    60typedef struct dwSocketServerObject* dwSocketServerHandle_t;
    61
    63typedef struct dwSocketClientObject* dwSocketClientHandle_t;
    64
    66typedef struct dwSocketConnectionObject* dwSocketConnectionHandle_t;
    67
    86dwStatus dwSocketServer_initialize(dwSocketServerHandle_t* const server, uint16_t const port, size_t const connectionPoolSize,
    87 dwConstContextHandle_t const context);
    88
    108 dwSocketServerHandle_t const server);
    109
    127dwStatus dwSocketServer_broadcast(uint8_t const* const buffer, size_t const bufferSize, dwSocketServerHandle_t const server);
    128
    143
    160dwStatus dwSocketClient_initialize(dwSocketClientHandle_t* const client, size_t const connectionPoolSize,
    161 dwConstContextHandle_t const context);
    162
    184dwStatus dwSocketClient_connect(dwSocketConnectionHandle_t* const connection, char8_t const* const host, uint16_t const port,
    185 dwTime_t const timeoutUs, dwSocketClientHandle_t const client);
    186
    204dwStatus dwSocketClient_broadcast(uint8_t const* const buffer, size_t const bufferSize, dwSocketClientHandle_t const client);
    205
    220
    243dwStatus dwSocketConnection_write(const void* const buffer, size_t* const bufferSize, dwTime_t const timeoutUs,
    244 dwSocketConnectionHandle_t const connection);
    245
    269dwStatus dwSocketConnection_peek(uint8_t* const buffer, size_t* const bufferSize,
    270 dwTime_t const timeoutUs,
    271 dwSocketConnectionHandle_t const connection);
    272
    293dwStatus dwSocketConnection_read(void* const buffer, size_t* const bufferSize, dwTime_t const timeoutUs, dwSocketConnectionHandle_t const connection);
    294
    309
    310#ifdef __cplusplus
    311}
    312#endif
    313
    316#endif // DW_IPC_SOCKETCLIENTSERVER_H_
    NVIDIA DriveWorks API: Core Methods
    dwStatus
    Status definition.
    Definition: ErrorDefs.h:44
    NVIDIA DriveWorks API: Core Status Methods
    NVIDIA DriveWorks API: Core Types
    NVIDIA DriveWorks API: Core Exports
    int64_t dwTime_t
    Specifies a timestamp unit, in microseconds.
    Definition: BasicTypes.h:65
    struct dwContextObject const * dwConstContextHandle_t
    The Driveworks context handle.
    Definition: Context.h:87
    #define DW_API_PUBLIC
    Definition: Exports.h:56
    DW_API_PUBLIC dwStatus dwSocketServer_release(dwSocketServerHandle_t const server)
    Terminate a socket server.
    DW_API_PUBLIC dwStatus dwSocketServer_broadcast(uint8_t const *const buffer, size_t const bufferSize, dwSocketServerHandle_t const server)
    Broadcasts a message to all connected sockets of the pool.
    DW_API_PUBLIC dwStatus dwSocketClient_connect(dwSocketConnectionHandle_t *const connection, char8_t const *const host, uint16_t const port, dwTime_t const timeoutUs, dwSocketClientHandle_t const client)
    Connects a socket connection to a listening socket server.
    DW_API_PUBLIC dwStatus dwSocketClient_release(dwSocketClientHandle_t const client)
    Terminate a socket client.
    DW_API_PUBLIC dwStatus dwSocketConnection_release(dwSocketConnectionHandle_t const connection)
    Terminate a socket connection.
    DW_API_PUBLIC dwStatus dwSocketConnection_read(void *const buffer, size_t *const bufferSize, dwTime_t const timeoutUs, dwSocketConnectionHandle_t const connection)
    Receive a message of a given length from the network connection.
    struct dwSocketServerObject * dwSocketServerHandle_t
    Handle representing the a network socket server.
    struct dwSocketClientObject * dwSocketClientHandle_t
    Handle representing the a network socket client.
    struct dwSocketConnectionObject * dwSocketConnectionHandle_t
    Handle representing the a bi-directional client-server network socket connection.
    DW_API_PUBLIC dwStatus dwSocketClient_initialize(dwSocketClientHandle_t *const client, size_t const connectionPoolSize, dwConstContextHandle_t const context)
    Creates and initializes a socket client.
    DW_API_PUBLIC dwStatus dwSocketServer_initialize(dwSocketServerHandle_t *const server, uint16_t const port, size_t const connectionPoolSize, dwConstContextHandle_t const context)
    Creates and initializes a socket server accepting incoming client connections.
    DW_API_PUBLIC dwStatus dwSocketConnection_write(const void *const buffer, size_t *const bufferSize, dwTime_t const timeoutUs, dwSocketConnectionHandle_t const connection)
    Send a message of a given length through the socket connection with a timeout.
    DW_API_PUBLIC dwStatus dwSocketClient_broadcast(uint8_t const *const buffer, size_t const bufferSize, dwSocketClientHandle_t const client)
    Broadcasts a message to all connected sockets of the pool.The pool is created in the initialization o...
    DW_API_PUBLIC dwStatus dwSocketConnection_peek(uint8_t *const buffer, size_t *const bufferSize, dwTime_t const timeoutUs, dwSocketConnectionHandle_t const connection)
    Peek at a message of a given length from the network connection (blocking within timeout period).
    DW_API_PUBLIC dwStatus dwSocketServer_accept(dwSocketConnectionHandle_t *const connection, dwTime_t const timeoutUs, dwSocketServerHandle_t const server)
    Accepts an incoming connection at a socket server.
    人人超碰97caoporen国产