34 #ifndef GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_H
35 #define GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_H
37 #include "src/core/iomgr/pollset.h"
38 #include <grpc/support/slice.h>
39 #include <grpc/support/time.h>
47 typedef enum grpc_endpoint_cb_status {
48 GRPC_ENDPOINT_CB_OK = 0,
50 GRPC_ENDPOINT_CB_SHUTDOWN,
51 GRPC_ENDPOINT_CB_ERROR
52 } grpc_endpoint_cb_status;
54 typedef enum grpc_endpoint_write_status {
55 GRPC_ENDPOINT_WRITE_DONE,
56 GRPC_ENDPOINT_WRITE_PENDING,
57 GRPC_ENDPOINT_WRITE_ERROR
58 } grpc_endpoint_write_status;
60 typedef void (*grpc_endpoint_read_cb)(
void *user_data,
gpr_slice *slices,
62 grpc_endpoint_cb_status error);
63 typedef void (*grpc_endpoint_write_cb)(
void *user_data,
64 grpc_endpoint_cb_status error);
67 void (*notify_on_read)(
grpc_endpoint *ep, grpc_endpoint_read_cb cb,
70 size_t nslices, grpc_endpoint_write_cb cb,
78 void grpc_endpoint_notify_on_read(
grpc_endpoint *ep, grpc_endpoint_read_cb cb,
87 grpc_endpoint_write_status grpc_endpoint_write(
grpc_endpoint *ep,
90 grpc_endpoint_write_cb cb,
Definition: pollset_posix.h:48
Definition: endpoint.h:66
Definition: endpoint.h:102