Debian Codegraph @

crt/aws-c-io/include/aws/io/socket_channel_handler.h

raw symbols SCIP
1 #ifndef AWS_IO_SOCKET_CHANNEL_HANDLER_H
2 #define AWS_IO_SOCKET_CHANNEL_HANDLER_H
3 /**
4 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
5 * SPDX-License-Identifier: Apache-2.0.
6 */
7
8 #include <aws/io/io.h>
9
10 AWS_PUSH_SANE_WARNING_LEVEL
11
12 struct aws_socket;
13 struct aws_channel_handler;
14 struct aws_channel_slot;
15 struct aws_event_loop;
16
17 AWS_EXTERN_C_BEGIN
18 /**
19 * Socket handlers should be the first slot/handler in a channel. It interacts directly with the channel's event loop
20 * for read and write notifications. max_read_size is the maximum amount of data it will read from the socket
21 * before a context switch (a continuation task will be scheduled).
22 */
23 AWS_IO_API struct aws_channel_handler *aws_socket_handler_new(
24 struct aws_allocator *allocator,
25 struct aws_socket *socket,
26 struct aws_channel_slot *slot,
27 size_t max_read_size);
28
29 /* Get aws_socket from socket channel handler */
30 AWS_IO_API const struct aws_socket *aws_socket_handler_get_socket(const struct aws_channel_handler *handler);
31
32 AWS_EXTERN_C_END
33 AWS_POP_SANE_WARNING_LEVEL
34
35 #endif /* AWS_IO_SOCKET_CHANNEL_HANDLER_H */