GRPC C++  1.30.0
Functions
grpc_posix.h File Reference
#include <grpc/support/port_platform.h>
#include <grpc/impl/codegen/grpc_types.h>
#include <stddef.h>

Go to the source code of this file.

Functions

GRPCAPI grpc_channelgrpc_insecure_channel_create_from_fd (const char *target, int fd, const grpc_channel_args *args)
 Create a client channel to 'target' using file descriptor 'fd'. More...
 
GRPCAPI void grpc_server_add_insecure_channel_from_fd (grpc_server *server, void *reserved, int fd)
 Add the connected communication channel based on file descriptor 'fd' to the 'server'. More...
 

Function Documentation

◆ grpc_insecure_channel_create_from_fd()

GRPCAPI grpc_channel* grpc_insecure_channel_create_from_fd ( const char *  target,
int  fd,
const grpc_channel_args args 
)

Create a client channel to 'target' using file descriptor 'fd'.

The 'target' argument will be used to indicate the name for this channel. See the comment for grpc_insecure_channel_create for description of 'args' argument.

◆ grpc_server_add_insecure_channel_from_fd()

GRPCAPI void grpc_server_add_insecure_channel_from_fd ( grpc_server server,
void *  reserved,
int  fd 
)

Add the connected communication channel based on file descriptor 'fd' to the 'server'.

The 'fd' must be an open file descriptor corresponding to a connected socket. Events from the file descriptor may come on any of the server completion queues (i.e completion queues registered via the grpc_server_register_completion_queue API).

The 'reserved' pointer MUST be NULL.