Skip to content

Commit

Permalink
move aws_io_handle
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed Dec 3, 2024
1 parent 6783915 commit 85bf6ce
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
14 changes: 0 additions & 14 deletions include/aws/io/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,6 @@ AWS_PUSH_SANE_WARNING_LEVEL

struct aws_io_handle;

typedef void aws_io_set_queue_on_handle_fn(struct aws_io_handle *handle, void *queue);
typedef void aws_io_clear_queue_on_handle_fn(struct aws_io_handle *handle);

struct aws_io_handle {
union {
int fd;
/* on Apple systems, handle is of type nw_connection_t. On Windows, it's a SOCKET handle. */
void *handle;
} data;
void *additional_data;
aws_io_set_queue_on_handle_fn *set_queue;
aws_io_clear_queue_on_handle_fn *clear_queue;
};

enum aws_io_message_type {
AWS_IO_MESSAGE_APPLICATION_DATA,
};
Expand Down
14 changes: 14 additions & 0 deletions include/aws/io/private/event_loop_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ AWS_PUSH_SANE_WARNING_LEVEL
struct aws_event_loop;
struct aws_overlapped;

typedef void aws_io_set_queue_on_handle_fn(struct aws_io_handle *handle, void *queue);
typedef void aws_io_clear_queue_on_handle_fn(struct aws_io_handle *handle);

struct aws_io_handle {
union {
int fd;
/* on Apple systems, handle is of type nw_connection_t. On Windows, it's a SOCKET handle. */
void *handle;
} data;
void *additional_data;
aws_io_set_queue_on_handle_fn *set_queue;
aws_io_clear_queue_on_handle_fn *clear_queue;
};

typedef void(aws_event_loop_on_completion_fn)(
struct aws_event_loop *event_loop,
struct aws_overlapped *overlapped,
Expand Down
1 change: 1 addition & 0 deletions include/aws/io/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <aws/io/channel.h>
#include <aws/io/event_loop.h>
#include <aws/io/io.h>
#include <aws/io/private/event_loop_impl.h>

AWS_PUSH_SANE_WARNING_LEVEL

Expand Down

0 comments on commit 85bf6ce

Please sign in to comment.