9 #include <aws/io/channel.h>
14 struct aws_array_list;
15 struct aws_io_message;
106 bool freeScarceResourcesImmediately) = 0;
132 struct aws_channel_handler *SeatForCInterop(
const std::shared_ptr<ChannelHandler> &selfRef);
137 bool ChannelsThreadIsCallersThread()
const;
144 void ShutDownChannel(
int errorCode);
150 void ScheduleTask(std::function<
void(
TaskStatus)> &&task);
157 void ScheduleTask(std::function<
void(
TaskStatus)> &&task, std::chrono::nanoseconds run_in);
165 struct aws_io_message *AcquireMessageFromPool(
MessageType messageType,
size_t sizeHint);
172 struct aws_io_message *AcquireMaxSizeMessageForWrite();
179 bool SendMessage(
struct aws_io_message *message,
ChannelDirection direction);
185 bool IncrementUpstreamReadWindow(
size_t windowUpdateSize);
191 void OnShutdownComplete(
ChannelDirection direction,
int errorCode,
bool freeScarceResourcesImmediately);
198 size_t DownstreamReadWindow()
const;
204 size_t UpstreamMessageOverhead()
const;
206 struct aws_channel_slot *GetSlot()
const;
208 struct aws_channel_handler m_handler;
212 std::shared_ptr<ChannelHandler> m_selfReference;
213 static struct aws_channel_handler_vtable s_vtable;
215 static void s_Destroy(
struct aws_channel_handler *handler);
216 static int s_ProcessReadMessage(
217 struct aws_channel_handler *,
218 struct aws_channel_slot *,
219 struct aws_io_message *);
220 static int s_ProcessWriteMessage(
221 struct aws_channel_handler *,
222 struct aws_channel_slot *,
223 struct aws_io_message *);
224 static int s_IncrementReadWindow(
struct aws_channel_handler *,
struct aws_channel_slot *,
size_t size);
225 static int s_ProcessShutdown(
226 struct aws_channel_handler *,
227 struct aws_channel_slot *,
228 enum aws_channel_direction,
230 bool freeScarceResourcesImmediately);
231 static size_t s_InitialWindowSize(
struct aws_channel_handler *);
232 static size_t s_MessageOverhead(
struct aws_channel_handler *);
233 static void s_ResetStatistics(
struct aws_channel_handler *);
234 static void s_GatherStatistics(
struct aws_channel_handler *,
struct aws_array_list *statsList);