/* * Copyright [2021] JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef DA_RESPONSE_H_ #define DA_RESPONSE_H_ struct conn; struct msg; struct context; void rsp_put(struct msg *msg); struct msg *rsp_get(struct conn *conn); struct msg *rsp_recv_next(struct context *ctx, struct conn *conn, bool alloc); void rsp_recv_done(struct context *ctx, struct conn *conn, struct msg *msg, struct msg *nmsg); void rsp_forward(struct context *ctx, struct conn *s_conn, struct msg *req); struct msg *rsp_send_next(struct context *ctx, struct conn *conn); void rsp_send_done(struct context *ctx, struct conn *conn, struct msg *msg); #endif /* DA_RESPONSE_H_ */