Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "LibAwsHTTPFork"
uuid = "d3f1d20b-921e-4930-8491-471e0be3121a"
version = "1.0.4"
version = "1.0.5"

[deps]
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
Expand All @@ -17,7 +17,7 @@ LibAwsCal = "1.1"
LibAwsCommon = "1.2"
LibAwsCompression = "1.1"
LibAwsIO = "1.2"
aws_c_http_jq_jll = "=0.9.8"
aws_c_http_jq_jll = "=0.10.1"
julia = "1.6"

[extras]
Expand Down
83 changes: 16 additions & 67 deletions lib/aarch64-apple-darwin20.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ struct aws_http2_connection_options
on_goaway_received::Ptr{aws_http2_on_goaway_received_fn}
on_remote_settings_change::Ptr{aws_http2_on_remote_settings_change_fn}
conn_manual_window_management::Bool
conn_window_size_threshold_to_send_update::UInt32
stream_window_size_threshold_to_send_update::UInt32
end

"""
Expand Down Expand Up @@ -584,7 +586,9 @@ If `conn_manual_window_management` is false, this call will have no effect. The

If you are not connected, this call will have no effect.

Crashes when the connection is not http2 connection. The limit of the Maximum Size is 2**31 - 1. If the increment size cause the connection flow window exceeds the Maximum size, this call will result in the connection lost.
Crashes when the connection is not http2 connection. The limit of the Maximum Size is 2**31 - 1. And client will make sure the WINDOW\\_UPDATE frame to be valid.

The client control exactly when the WINDOW\\_UPDATE frame sent. Check `conn_window_size_threshold_to_send_update` for details.

# Arguments
* `http2_connection`: HTTP/2 connection.
Expand Down Expand Up @@ -918,6 +922,7 @@ struct aws_http2_stream_manager_options
max_closed_streams::Csize_t
conn_manual_window_management::Bool
enable_read_back_pressure::Bool
initial_window_size::Csize_t
monitoring_options::Ptr{aws_http_connection_monitoring_options}
proxy_options::Ptr{aws_http_proxy_options}
proxy_ev_settings::Ptr{proxy_env_var_settings}
Expand Down Expand Up @@ -1198,28 +1203,28 @@ struct aws_http_proxy_negotiator_tunnelling_vtable
end

"""
union (unnamed at /home/runner/.julia/artifacts/0dcbf6df3f3caedaddc5b6babfde533b9631ca87/include/aws/http/proxy.h:302:5)
union (unnamed at /home/runner/.julia/artifacts/a1726f49d1eb59d841d583d5c32e0c89f1f5fa91/include/aws/http/proxy.h:302:5)

Documentation not found.
"""
struct var"union (unnamed at /home/runner/.julia/artifacts/0dcbf6df3f3caedaddc5b6babfde533b9631ca87/include/aws/http/proxy.h:302:5)"
struct var"union (unnamed at /home/runner/.julia/artifacts/a1726f49d1eb59d841d583d5c32e0c89f1f5fa91/include/aws/http/proxy.h:302:5)"
data::NTuple{8, UInt8}
end

function Base.getproperty(x::Ptr{var"union (unnamed at /home/runner/.julia/artifacts/0dcbf6df3f3caedaddc5b6babfde533b9631ca87/include/aws/http/proxy.h:302:5)"}, f::Symbol)
function Base.getproperty(x::Ptr{var"union (unnamed at /home/runner/.julia/artifacts/a1726f49d1eb59d841d583d5c32e0c89f1f5fa91/include/aws/http/proxy.h:302:5)"}, f::Symbol)
f === :forwarding_vtable && return Ptr{Ptr{aws_http_proxy_negotiator_forwarding_vtable}}(x + 0)
f === :tunnelling_vtable && return Ptr{Ptr{aws_http_proxy_negotiator_tunnelling_vtable}}(x + 0)
return getfield(x, f)
end

function Base.getproperty(x::var"union (unnamed at /home/runner/.julia/artifacts/0dcbf6df3f3caedaddc5b6babfde533b9631ca87/include/aws/http/proxy.h:302:5)", f::Symbol)
r = Ref{var"union (unnamed at /home/runner/.julia/artifacts/0dcbf6df3f3caedaddc5b6babfde533b9631ca87/include/aws/http/proxy.h:302:5)"}(x)
ptr = Base.unsafe_convert(Ptr{var"union (unnamed at /home/runner/.julia/artifacts/0dcbf6df3f3caedaddc5b6babfde533b9631ca87/include/aws/http/proxy.h:302:5)"}, r)
function Base.getproperty(x::var"union (unnamed at /home/runner/.julia/artifacts/a1726f49d1eb59d841d583d5c32e0c89f1f5fa91/include/aws/http/proxy.h:302:5)", f::Symbol)
r = Ref{var"union (unnamed at /home/runner/.julia/artifacts/a1726f49d1eb59d841d583d5c32e0c89f1f5fa91/include/aws/http/proxy.h:302:5)"}(x)
ptr = Base.unsafe_convert(Ptr{var"union (unnamed at /home/runner/.julia/artifacts/a1726f49d1eb59d841d583d5c32e0c89f1f5fa91/include/aws/http/proxy.h:302:5)"}, r)
fptr = getproperty(ptr, f)
GC.@preserve r unsafe_load(fptr)
end

function Base.setproperty!(x::Ptr{var"union (unnamed at /home/runner/.julia/artifacts/0dcbf6df3f3caedaddc5b6babfde533b9631ca87/include/aws/http/proxy.h:302:5)"}, f::Symbol, v)
function Base.setproperty!(x::Ptr{var"union (unnamed at /home/runner/.julia/artifacts/a1726f49d1eb59d841d583d5c32e0c89f1f5fa91/include/aws/http/proxy.h:302:5)"}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end

Expand All @@ -1235,7 +1240,7 @@ end
function Base.getproperty(x::Ptr{aws_http_proxy_negotiator}, f::Symbol)
f === :ref_count && return Ptr{aws_ref_count}(x + 0)
f === :impl && return Ptr{Ptr{Cvoid}}(x + 24)
f === :strategy_vtable && return Ptr{var"union (unnamed at /home/runner/.julia/artifacts/0dcbf6df3f3caedaddc5b6babfde533b9631ca87/include/aws/http/proxy.h:302:5)"}(x + 32)
f === :strategy_vtable && return Ptr{var"union (unnamed at /home/runner/.julia/artifacts/a1726f49d1eb59d841d583d5c32e0c89f1f5fa91/include/aws/http/proxy.h:302:5)"}(x + 32)
return getfield(x, f)
end

Expand Down Expand Up @@ -2941,6 +2946,8 @@ If the connection was created with `manual_window_management` set true, the flow

If `manual_window_management` is false, this call will have no effect. The connection maintains its flow-control windows such that no back-pressure is applied and data arrives as fast as possible.

For HTTP/2, the client control exactly when the WINDOW\\_UPDATE frame sent. And client will make sure the WINDOW\\_UPDATE frame to be valid. Check `stream_window_size_threshold_to_send_update` for details.

### Prototype
```c
void aws_http_stream_update_window(struct aws_http_stream *stream, size_t increment_size);
Expand Down Expand Up @@ -3448,20 +3455,6 @@ struct aws_websocket_client_connection_options
host_resolution_config::Ptr{aws_host_resolution_config}
end

"""
aws_websocket_server_upgrade_options

Documentation not found.
"""
struct aws_websocket_server_upgrade_options
initial_window_size::Csize_t
user_data::Ptr{Cvoid}
on_incoming_frame_begin::Ptr{aws_websocket_on_incoming_frame_begin_fn}
on_incoming_frame_payload::Ptr{aws_websocket_on_incoming_frame_payload_fn}
on_incoming_frame_complete::Ptr{aws_websocket_on_incoming_frame_complete_fn}
manual_window_management::Bool
end

# typedef bool ( aws_websocket_stream_outgoing_payload_fn ) ( struct aws_websocket * websocket , struct aws_byte_buf * out_buf , void * user_data )
"""
Called repeatedly as the websocket's payload is streamed out. The user should write payload data to out\\_buf, up to available capacity. The websocket will mask this data for you, if necessary. Invoked repeatedly on the websocket's event-loop thread.
Expand Down Expand Up @@ -3662,50 +3655,6 @@ function aws_http_message_new_websocket_handshake_request(allocator, path, host)
ccall((:aws_http_message_new_websocket_handshake_request, libaws_c_http_jq), Ptr{aws_http_message}, (Ptr{aws_allocator}, aws_byte_cursor, aws_byte_cursor), allocator, path, host)
end

"""
aws_websocket_is_websocket_request(request)

Return true if the request is a valid websocket upgrade request.

### Prototype
```c
bool aws_websocket_is_websocket_request(const struct aws_http_message *request);
```
"""
function aws_websocket_is_websocket_request(request)
ccall((:aws_websocket_is_websocket_request, libaws_c_http_jq), Bool, (Ptr{aws_http_message},), request)
end

"""
aws_http_message_new_websocket_handshake_response(allocator, accept_key)

Create response with all required fields for a websocket upgrade response. The following headers are added:

Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: <base64 encoded accept key>

### Prototype
```c
struct aws_http_message *aws_http_message_new_websocket_handshake_response( struct aws_allocator *allocator, struct aws_byte_cursor accept_key);
```
"""
function aws_http_message_new_websocket_handshake_response(allocator, accept_key)
ccall((:aws_http_message_new_websocket_handshake_response, libaws_c_http_jq), Ptr{aws_http_message}, (Ptr{aws_allocator}, aws_byte_cursor), allocator, accept_key)
end

"""
aws_websocket_upgrade(allocator, stream, options)

Upgrade an incoming HTTP connection to a websocket connection. This function should be called from the on\\_request\\_done callback of a request handler. It expects a fully constructed request and will handle sending the handshake response and install the websocket handler into the channel.

### Prototype
```c
struct aws_websocket *aws_websocket_upgrade( struct aws_allocator *allocator, struct aws_http_stream *stream, const struct aws_websocket_server_upgrade_options *options);
```
"""
function aws_websocket_upgrade(allocator, stream, options)
ccall((:aws_websocket_upgrade, libaws_c_http_jq), Ptr{aws_websocket}, (Ptr{aws_allocator}, Ptr{aws_http_stream}, Ptr{aws_websocket_server_upgrade_options}), allocator, stream, options)
end

"""
Documentation not found.
"""
Expand Down
83 changes: 16 additions & 67 deletions lib/aarch64-linux-gnu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ struct aws_http2_connection_options
on_goaway_received::Ptr{aws_http2_on_goaway_received_fn}
on_remote_settings_change::Ptr{aws_http2_on_remote_settings_change_fn}
conn_manual_window_management::Bool
conn_window_size_threshold_to_send_update::UInt32
stream_window_size_threshold_to_send_update::UInt32
end

"""
Expand Down Expand Up @@ -584,7 +586,9 @@ If `conn_manual_window_management` is false, this call will have no effect. The

If you are not connected, this call will have no effect.

Crashes when the connection is not http2 connection. The limit of the Maximum Size is 2**31 - 1. If the increment size cause the connection flow window exceeds the Maximum size, this call will result in the connection lost.
Crashes when the connection is not http2 connection. The limit of the Maximum Size is 2**31 - 1. And client will make sure the WINDOW\\_UPDATE frame to be valid.

The client control exactly when the WINDOW\\_UPDATE frame sent. Check `conn_window_size_threshold_to_send_update` for details.

# Arguments
* `http2_connection`: HTTP/2 connection.
Expand Down Expand Up @@ -918,6 +922,7 @@ struct aws_http2_stream_manager_options
max_closed_streams::Csize_t
conn_manual_window_management::Bool
enable_read_back_pressure::Bool
initial_window_size::Csize_t
monitoring_options::Ptr{aws_http_connection_monitoring_options}
proxy_options::Ptr{aws_http_proxy_options}
proxy_ev_settings::Ptr{proxy_env_var_settings}
Expand Down Expand Up @@ -1198,28 +1203,28 @@ struct aws_http_proxy_negotiator_tunnelling_vtable
end

"""
union (unnamed at /home/runner/.julia/artifacts/8cb5b99a1d1e52a9a0e431915199b52f680336d0/include/aws/http/proxy.h:302:5)
union (unnamed at /home/runner/.julia/artifacts/c69e05430e010aa9980e01774fd723b0bb937a9e/include/aws/http/proxy.h:302:5)

Documentation not found.
"""
struct var"union (unnamed at /home/runner/.julia/artifacts/8cb5b99a1d1e52a9a0e431915199b52f680336d0/include/aws/http/proxy.h:302:5)"
struct var"union (unnamed at /home/runner/.julia/artifacts/c69e05430e010aa9980e01774fd723b0bb937a9e/include/aws/http/proxy.h:302:5)"
data::NTuple{8, UInt8}
end

function Base.getproperty(x::Ptr{var"union (unnamed at /home/runner/.julia/artifacts/8cb5b99a1d1e52a9a0e431915199b52f680336d0/include/aws/http/proxy.h:302:5)"}, f::Symbol)
function Base.getproperty(x::Ptr{var"union (unnamed at /home/runner/.julia/artifacts/c69e05430e010aa9980e01774fd723b0bb937a9e/include/aws/http/proxy.h:302:5)"}, f::Symbol)
f === :forwarding_vtable && return Ptr{Ptr{aws_http_proxy_negotiator_forwarding_vtable}}(x + 0)
f === :tunnelling_vtable && return Ptr{Ptr{aws_http_proxy_negotiator_tunnelling_vtable}}(x + 0)
return getfield(x, f)
end

function Base.getproperty(x::var"union (unnamed at /home/runner/.julia/artifacts/8cb5b99a1d1e52a9a0e431915199b52f680336d0/include/aws/http/proxy.h:302:5)", f::Symbol)
r = Ref{var"union (unnamed at /home/runner/.julia/artifacts/8cb5b99a1d1e52a9a0e431915199b52f680336d0/include/aws/http/proxy.h:302:5)"}(x)
ptr = Base.unsafe_convert(Ptr{var"union (unnamed at /home/runner/.julia/artifacts/8cb5b99a1d1e52a9a0e431915199b52f680336d0/include/aws/http/proxy.h:302:5)"}, r)
function Base.getproperty(x::var"union (unnamed at /home/runner/.julia/artifacts/c69e05430e010aa9980e01774fd723b0bb937a9e/include/aws/http/proxy.h:302:5)", f::Symbol)
r = Ref{var"union (unnamed at /home/runner/.julia/artifacts/c69e05430e010aa9980e01774fd723b0bb937a9e/include/aws/http/proxy.h:302:5)"}(x)
ptr = Base.unsafe_convert(Ptr{var"union (unnamed at /home/runner/.julia/artifacts/c69e05430e010aa9980e01774fd723b0bb937a9e/include/aws/http/proxy.h:302:5)"}, r)
fptr = getproperty(ptr, f)
GC.@preserve r unsafe_load(fptr)
end

function Base.setproperty!(x::Ptr{var"union (unnamed at /home/runner/.julia/artifacts/8cb5b99a1d1e52a9a0e431915199b52f680336d0/include/aws/http/proxy.h:302:5)"}, f::Symbol, v)
function Base.setproperty!(x::Ptr{var"union (unnamed at /home/runner/.julia/artifacts/c69e05430e010aa9980e01774fd723b0bb937a9e/include/aws/http/proxy.h:302:5)"}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end

Expand All @@ -1235,7 +1240,7 @@ end
function Base.getproperty(x::Ptr{aws_http_proxy_negotiator}, f::Symbol)
f === :ref_count && return Ptr{aws_ref_count}(x + 0)
f === :impl && return Ptr{Ptr{Cvoid}}(x + 24)
f === :strategy_vtable && return Ptr{var"union (unnamed at /home/runner/.julia/artifacts/8cb5b99a1d1e52a9a0e431915199b52f680336d0/include/aws/http/proxy.h:302:5)"}(x + 32)
f === :strategy_vtable && return Ptr{var"union (unnamed at /home/runner/.julia/artifacts/c69e05430e010aa9980e01774fd723b0bb937a9e/include/aws/http/proxy.h:302:5)"}(x + 32)
return getfield(x, f)
end

Expand Down Expand Up @@ -2941,6 +2946,8 @@ If the connection was created with `manual_window_management` set true, the flow

If `manual_window_management` is false, this call will have no effect. The connection maintains its flow-control windows such that no back-pressure is applied and data arrives as fast as possible.

For HTTP/2, the client control exactly when the WINDOW\\_UPDATE frame sent. And client will make sure the WINDOW\\_UPDATE frame to be valid. Check `stream_window_size_threshold_to_send_update` for details.

### Prototype
```c
void aws_http_stream_update_window(struct aws_http_stream *stream, size_t increment_size);
Expand Down Expand Up @@ -3448,20 +3455,6 @@ struct aws_websocket_client_connection_options
host_resolution_config::Ptr{aws_host_resolution_config}
end

"""
aws_websocket_server_upgrade_options

Documentation not found.
"""
struct aws_websocket_server_upgrade_options
initial_window_size::Csize_t
user_data::Ptr{Cvoid}
on_incoming_frame_begin::Ptr{aws_websocket_on_incoming_frame_begin_fn}
on_incoming_frame_payload::Ptr{aws_websocket_on_incoming_frame_payload_fn}
on_incoming_frame_complete::Ptr{aws_websocket_on_incoming_frame_complete_fn}
manual_window_management::Bool
end

# typedef bool ( aws_websocket_stream_outgoing_payload_fn ) ( struct aws_websocket * websocket , struct aws_byte_buf * out_buf , void * user_data )
"""
Called repeatedly as the websocket's payload is streamed out. The user should write payload data to out\\_buf, up to available capacity. The websocket will mask this data for you, if necessary. Invoked repeatedly on the websocket's event-loop thread.
Expand Down Expand Up @@ -3662,50 +3655,6 @@ function aws_http_message_new_websocket_handshake_request(allocator, path, host)
ccall((:aws_http_message_new_websocket_handshake_request, libaws_c_http_jq), Ptr{aws_http_message}, (Ptr{aws_allocator}, aws_byte_cursor, aws_byte_cursor), allocator, path, host)
end

"""
aws_websocket_is_websocket_request(request)

Return true if the request is a valid websocket upgrade request.

### Prototype
```c
bool aws_websocket_is_websocket_request(const struct aws_http_message *request);
```
"""
function aws_websocket_is_websocket_request(request)
ccall((:aws_websocket_is_websocket_request, libaws_c_http_jq), Bool, (Ptr{aws_http_message},), request)
end

"""
aws_http_message_new_websocket_handshake_response(allocator, accept_key)

Create response with all required fields for a websocket upgrade response. The following headers are added:

Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: <base64 encoded accept key>

### Prototype
```c
struct aws_http_message *aws_http_message_new_websocket_handshake_response( struct aws_allocator *allocator, struct aws_byte_cursor accept_key);
```
"""
function aws_http_message_new_websocket_handshake_response(allocator, accept_key)
ccall((:aws_http_message_new_websocket_handshake_response, libaws_c_http_jq), Ptr{aws_http_message}, (Ptr{aws_allocator}, aws_byte_cursor), allocator, accept_key)
end

"""
aws_websocket_upgrade(allocator, stream, options)

Upgrade an incoming HTTP connection to a websocket connection. This function should be called from the on\\_request\\_done callback of a request handler. It expects a fully constructed request and will handle sending the handshake response and install the websocket handler into the channel.

### Prototype
```c
struct aws_websocket *aws_websocket_upgrade( struct aws_allocator *allocator, struct aws_http_stream *stream, const struct aws_websocket_server_upgrade_options *options);
```
"""
function aws_websocket_upgrade(allocator, stream, options)
ccall((:aws_websocket_upgrade, libaws_c_http_jq), Ptr{aws_websocket}, (Ptr{aws_allocator}, Ptr{aws_http_stream}, Ptr{aws_websocket_server_upgrade_options}), allocator, stream, options)
end

"""
Documentation not found.
"""
Expand Down
Loading
Loading