diff options
Diffstat (limited to 'src/core/lib/iomgr/socket_utils_posix.h')
-rw-r--r-- | src/core/lib/iomgr/socket_utils_posix.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/core/lib/iomgr/socket_utils_posix.h b/src/core/lib/iomgr/socket_utils_posix.h index 73809b68d3..7a9c8139e7 100644 --- a/src/core/lib/iomgr/socket_utils_posix.h +++ b/src/core/lib/iomgr/socket_utils_posix.h @@ -34,23 +34,23 @@ extern "C" { #endif /* a wrapper for accept or accept4 */ -int grpc_accept4(int sockfd, grpc_resolved_address *resolved_addr, int nonblock, +int grpc_accept4(int sockfd, grpc_resolved_address* resolved_addr, int nonblock, int cloexec); /* set a socket to non blocking mode */ -grpc_error *grpc_set_socket_nonblocking(int fd, int non_blocking); +grpc_error* grpc_set_socket_nonblocking(int fd, int non_blocking); /* set a socket to close on exec */ -grpc_error *grpc_set_socket_cloexec(int fd, int close_on_exec); +grpc_error* grpc_set_socket_cloexec(int fd, int close_on_exec); /* set a socket to reuse old addresses */ -grpc_error *grpc_set_socket_reuse_addr(int fd, int reuse); +grpc_error* grpc_set_socket_reuse_addr(int fd, int reuse); /* disable nagle */ -grpc_error *grpc_set_socket_low_latency(int fd, int low_latency); +grpc_error* grpc_set_socket_low_latency(int fd, int low_latency); /* set SO_REUSEPORT */ -grpc_error *grpc_set_socket_reuse_port(int fd, int reuse); +grpc_error* grpc_set_socket_reuse_port(int fd, int reuse); /* Returns true if this system can create AF_INET6 sockets bound to ::1. The value is probed once, and cached for the life of the process. @@ -64,24 +64,24 @@ int grpc_ipv6_loopback_available(void); /* Tries to set SO_NOSIGPIPE if available on this platform. If SO_NO_SIGPIPE is not available, returns 1. */ -grpc_error *grpc_set_socket_no_sigpipe_if_possible(int fd); +grpc_error* grpc_set_socket_no_sigpipe_if_possible(int fd); /* Tries to set IP_PKTINFO if available on this platform. If IP_PKTINFO is not available, returns 1. */ -grpc_error *grpc_set_socket_ip_pktinfo_if_possible(int fd); +grpc_error* grpc_set_socket_ip_pktinfo_if_possible(int fd); /* Tries to set IPV6_RECVPKTINFO if available on this platform. If IPV6_RECVPKTINFO is not available, returns 1. */ -grpc_error *grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd); +grpc_error* grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd); /* Tries to set the socket's send buffer to given size. */ -grpc_error *grpc_set_socket_sndbuf(int fd, int buffer_size_bytes); +grpc_error* grpc_set_socket_sndbuf(int fd, int buffer_size_bytes); /* Tries to set the socket's receive buffer to given size. */ -grpc_error *grpc_set_socket_rcvbuf(int fd, int buffer_size_bytes); +grpc_error* grpc_set_socket_rcvbuf(int fd, int buffer_size_bytes); /* Tries to set the socket using a grpc_socket_mutator */ -grpc_error *grpc_set_socket_with_mutator(int fd, grpc_socket_mutator *mutator); +grpc_error* grpc_set_socket_with_mutator(int fd, grpc_socket_mutator* mutator); /* An enum to keep track of IPv4/IPv6 socket modes. @@ -122,16 +122,16 @@ extern int grpc_forbid_dualstack_sockets_for_testing; IPv4, so that bind() or connect() see the correct family. Also, it's important to distinguish between DUALSTACK and IPV6 when listening on the [::] wildcard address. */ -grpc_error *grpc_create_dualstack_socket(const grpc_resolved_address *addr, +grpc_error* grpc_create_dualstack_socket(const grpc_resolved_address* addr, int type, int protocol, - grpc_dualstack_mode *dsmode, - int *newfd); + grpc_dualstack_mode* dsmode, + int* newfd); /* Same as grpc_create_dualstack_socket(), but use the given socket factory (if non-null) to create the socket, rather than calling socket() directly. */ -grpc_error *grpc_create_dualstack_socket_using_factory( - grpc_socket_factory *factory, const grpc_resolved_address *addr, int type, - int protocol, grpc_dualstack_mode *dsmode, int *newfd); +grpc_error* grpc_create_dualstack_socket_using_factory( + grpc_socket_factory* factory, const grpc_resolved_address* addr, int type, + int protocol, grpc_dualstack_mode* dsmode, int* newfd); #ifdef __cplusplus } |