Skip to content

Commit 09f0dd7

Browse files
quinnj2quinnj
andauthored
Update aws_c_http_jq_jll to version 0.10.10 (#13)
Co-authored-by: quinnj <2896623+quinnj@users.noreply.github.com>
1 parent 83e9a68 commit 09f0dd7

14 files changed

Lines changed: 1597 additions & 352 deletions

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "LibAwsHTTPFork"
22
uuid = "d3f1d20b-921e-4930-8491-471e0be3121a"
3-
version = "1.0.6"
3+
version = "1.0.7"
44

55
[deps]
66
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
@@ -17,7 +17,7 @@ LibAwsCal = "1.1"
1717
LibAwsCommon = "1.2"
1818
LibAwsCompression = "1.1"
1919
LibAwsIO = "1.2"
20-
aws_c_http_jq_jll = "=0.10.6"
20+
aws_c_http_jq_jll = "=0.10.10"
2121
julia = "1.6"
2222
Test = "1.11"
2323

lib/aarch64-apple-darwin20.jl

Lines changed: 125 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using CEnum
1+
using CEnum: CEnum, @cenum
22

33
# typedef void ( aws_http_on_client_connection_setup_fn ) ( struct aws_http_connection * connection , int error_code , void * user_data )
44
"""
@@ -868,6 +868,19 @@ function aws_http_library_clean_up()
868868
ccall((:aws_http_library_clean_up, libaws_c_http_jq), Cvoid, ())
869869
end
870870

871+
"""
872+
aws_http_error_code_is_retryable(error_code)
873+
874+
Documentation not found.
875+
### Prototype
876+
```c
877+
bool aws_http_error_code_is_retryable(int error_code);
878+
```
879+
"""
880+
function aws_http_error_code_is_retryable(error_code)
881+
ccall((:aws_http_error_code_is_retryable, libaws_c_http_jq), Bool, (Cint,), error_code)
882+
end
883+
871884
"""
872885
aws_http_status_text(status_code)
873886
@@ -1204,31 +1217,39 @@ struct aws_http_proxy_negotiator_tunnelling_vtable
12041217
end
12051218

12061219
"""
1207-
union (unnamed at /home/runner/.julia/artifacts/7462356ce6118e7f75f705b89b1ae23564fddadc/include/aws/http/proxy.h:310:5)
1220+
__JL_Ctag_38
12081221
12091222
Documentation not found.
12101223
"""
1211-
struct var"union (unnamed at /home/runner/.julia/artifacts/7462356ce6118e7f75f705b89b1ae23564fddadc/include/aws/http/proxy.h:310:5)"
1224+
struct __JL_Ctag_38
12121225
data::NTuple{8, UInt8}
12131226
end
12141227

1215-
function Base.getproperty(x::Ptr{var"union (unnamed at /home/runner/.julia/artifacts/7462356ce6118e7f75f705b89b1ae23564fddadc/include/aws/http/proxy.h:310:5)"}, f::Symbol)
1228+
function Base.getproperty(x::Ptr{__JL_Ctag_38}, f::Symbol)
12161229
f === :forwarding_vtable && return Ptr{Ptr{aws_http_proxy_negotiator_forwarding_vtable}}(x + 0)
12171230
f === :tunnelling_vtable && return Ptr{Ptr{aws_http_proxy_negotiator_tunnelling_vtable}}(x + 0)
12181231
return getfield(x, f)
12191232
end
12201233

1221-
function Base.getproperty(x::var"union (unnamed at /home/runner/.julia/artifacts/7462356ce6118e7f75f705b89b1ae23564fddadc/include/aws/http/proxy.h:310:5)", f::Symbol)
1222-
r = Ref{var"union (unnamed at /home/runner/.julia/artifacts/7462356ce6118e7f75f705b89b1ae23564fddadc/include/aws/http/proxy.h:310:5)"}(x)
1223-
ptr = Base.unsafe_convert(Ptr{var"union (unnamed at /home/runner/.julia/artifacts/7462356ce6118e7f75f705b89b1ae23564fddadc/include/aws/http/proxy.h:310:5)"}, r)
1234+
function Base.getproperty(x::__JL_Ctag_38, f::Symbol)
1235+
r = Ref{__JL_Ctag_38}(x)
1236+
ptr = Base.unsafe_convert(Ptr{__JL_Ctag_38}, r)
12241237
fptr = getproperty(ptr, f)
12251238
GC.@preserve r unsafe_load(fptr)
12261239
end
12271240

1228-
function Base.setproperty!(x::Ptr{var"union (unnamed at /home/runner/.julia/artifacts/7462356ce6118e7f75f705b89b1ae23564fddadc/include/aws/http/proxy.h:310:5)"}, f::Symbol, v)
1241+
function Base.setproperty!(x::Ptr{__JL_Ctag_38}, f::Symbol, v)
12291242
unsafe_store!(getproperty(x, f), v)
12301243
end
12311244

1245+
function Base.propertynames(x::__JL_Ctag_38, private::Bool = false)
1246+
(:forwarding_vtable, :tunnelling_vtable, if private
1247+
fieldnames(typeof(x))
1248+
else
1249+
()
1250+
end...)
1251+
end
1252+
12321253
"""
12331254
aws_http_proxy_negotiator
12341255
@@ -1241,7 +1262,7 @@ end
12411262
function Base.getproperty(x::Ptr{aws_http_proxy_negotiator}, f::Symbol)
12421263
f === :ref_count && return Ptr{aws_ref_count}(x + 0)
12431264
f === :impl && return Ptr{Ptr{Cvoid}}(x + 24)
1244-
f === :strategy_vtable && return Ptr{var"union (unnamed at /home/runner/.julia/artifacts/7462356ce6118e7f75f705b89b1ae23564fddadc/include/aws/http/proxy.h:310:5)"}(x + 32)
1265+
f === :strategy_vtable && return Ptr{__JL_Ctag_38}(x + 32)
12451266
return getfield(x, f)
12461267
end
12471268

@@ -1256,6 +1277,14 @@ function Base.setproperty!(x::Ptr{aws_http_proxy_negotiator}, f::Symbol, v)
12561277
unsafe_store!(getproperty(x, f), v)
12571278
end
12581279

1280+
function Base.propertynames(x::aws_http_proxy_negotiator, private::Bool = false)
1281+
(:ref_count, :impl, :strategy_vtable, if private
1282+
fieldnames(typeof(x))
1283+
else
1284+
()
1285+
end...)
1286+
end
1287+
12591288
"""
12601289
aws_http_proxy_strategy_basic_auth_options
12611290
@@ -2442,14 +2471,15 @@ function aws_http_message_set_body_stream(message, body_stream)
24422471
end
24432472

24442473
"""
2445-
Documentation not found.
2474+
aws\\_future<aws\\_http\\_message*>
24462475
"""
24472476
mutable struct aws_future_http_message end
24482477

24492478
"""
24502479
aws_future_http_message_new(alloc)
24512480
2452-
Documentation not found.
2481+
aws\\_future<aws\\_http\\_message*>
2482+
24532483
### Prototype
24542484
```c
24552485
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);
@@ -2462,7 +2492,8 @@ end
24622492
"""
24632493
aws_future_http_message_set_result_by_move(future, pointer_address)
24642494
2465-
Documentation not found.
2495+
aws\\_future<aws\\_http\\_message*>
2496+
24662497
### Prototype
24672498
```c
24682499
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);
@@ -2475,7 +2506,8 @@ end
24752506
"""
24762507
aws_future_http_message_get_result_by_move(future)
24772508
2478-
Documentation not found.
2509+
aws\\_future<aws\\_http\\_message*>
2510+
24792511
### Prototype
24802512
```c
24812513
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);
@@ -2488,7 +2520,8 @@ end
24882520
"""
24892521
aws_future_http_message_peek_result(future)
24902522
2491-
Documentation not found.
2523+
aws\\_future<aws\\_http\\_message*>
2524+
24922525
### Prototype
24932526
```c
24942527
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);
@@ -2501,7 +2534,8 @@ end
25012534
"""
25022535
aws_future_http_message_acquire(future)
25032536
2504-
Documentation not found.
2537+
aws\\_future<aws\\_http\\_message*>
2538+
25052539
### Prototype
25062540
```c
25072541
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);
@@ -2514,7 +2548,8 @@ end
25142548
"""
25152549
aws_future_http_message_release(future)
25162550
2517-
Documentation not found.
2551+
aws\\_future<aws\\_http\\_message*>
2552+
25182553
### Prototype
25192554
```c
25202555
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);
@@ -2527,7 +2562,8 @@ end
25272562
"""
25282563
aws_future_http_message_set_error(future, error_code)
25292564
2530-
Documentation not found.
2565+
aws\\_future<aws\\_http\\_message*>
2566+
25312567
### Prototype
25322568
```c
25332569
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);
@@ -2540,7 +2576,8 @@ end
25402576
"""
25412577
aws_future_http_message_is_done(future)
25422578
2543-
Documentation not found.
2579+
aws\\_future<aws\\_http\\_message*>
2580+
25442581
### Prototype
25452582
```c
25462583
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);
@@ -2553,7 +2590,8 @@ end
25532590
"""
25542591
aws_future_http_message_get_error(future)
25552592
2556-
Documentation not found.
2593+
aws\\_future<aws\\_http\\_message*>
2594+
25572595
### Prototype
25582596
```c
25592597
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);
@@ -2566,7 +2604,8 @@ end
25662604
"""
25672605
aws_future_http_message_register_callback(future, on_done, user_data)
25682606
2569-
Documentation not found.
2607+
aws\\_future<aws\\_http\\_message*>
2608+
25702609
### Prototype
25712610
```c
25722611
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);
@@ -2579,7 +2618,8 @@ end
25792618
"""
25802619
aws_future_http_message_register_callback_if_not_done(future, on_done, user_data)
25812620
2582-
Documentation not found.
2621+
aws\\_future<aws\\_http\\_message*>
2622+
25832623
### Prototype
25842624
```c
25852625
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);
@@ -2592,7 +2632,8 @@ end
25922632
"""
25932633
aws_future_http_message_register_event_loop_callback(future, event_loop, on_done, user_data)
25942634
2595-
Documentation not found.
2635+
aws\\_future<aws\\_http\\_message*>
2636+
25962637
### Prototype
25972638
```c
25982639
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);
@@ -2605,7 +2646,8 @@ end
26052646
"""
26062647
aws_future_http_message_register_channel_callback(future, channel, on_done, user_data)
26072648
2608-
Documentation not found.
2649+
aws\\_future<aws\\_http\\_message*>
2650+
26092651
### Prototype
26102652
```c
26112653
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);
@@ -2618,7 +2660,8 @@ end
26182660
"""
26192661
aws_future_http_message_wait(future, timeout_ns)
26202662
2621-
Documentation not found.
2663+
aws\\_future<aws\\_http\\_message*>
2664+
26222665
### Prototype
26232666
```c
26242667
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API);
@@ -3456,6 +3499,20 @@ struct aws_websocket_client_connection_options
34563499
host_resolution_config::Ptr{aws_host_resolution_config}
34573500
end
34583501

3502+
"""
3503+
aws_websocket_server_upgrade_options
3504+
3505+
Documentation not found.
3506+
"""
3507+
struct aws_websocket_server_upgrade_options
3508+
initial_window_size::Csize_t
3509+
user_data::Ptr{Cvoid}
3510+
on_incoming_frame_begin::Ptr{aws_websocket_on_incoming_frame_begin_fn}
3511+
on_incoming_frame_payload::Ptr{aws_websocket_on_incoming_frame_payload_fn}
3512+
on_incoming_frame_complete::Ptr{aws_websocket_on_incoming_frame_complete_fn}
3513+
manual_window_management::Bool
3514+
end
3515+
34593516
# typedef bool ( aws_websocket_stream_outgoing_payload_fn ) ( struct aws_websocket * websocket , struct aws_byte_buf * out_buf , void * user_data )
34603517
"""
34613518
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.
@@ -3656,6 +3713,50 @@ function aws_http_message_new_websocket_handshake_request(allocator, path, host)
36563713
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)
36573714
end
36583715

3716+
"""
3717+
aws_websocket_is_websocket_request(request)
3718+
3719+
Return true if the request is a valid websocket upgrade request.
3720+
3721+
### Prototype
3722+
```c
3723+
bool aws_websocket_is_websocket_request(const struct aws_http_message *request);
3724+
```
3725+
"""
3726+
function aws_websocket_is_websocket_request(request)
3727+
ccall((:aws_websocket_is_websocket_request, libaws_c_http_jq), Bool, (Ptr{aws_http_message},), request)
3728+
end
3729+
3730+
"""
3731+
aws_http_message_new_websocket_handshake_response(allocator, accept_key)
3732+
3733+
Create response with all required fields for a websocket upgrade response. The following headers are added:
3734+
3735+
Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: <base64 encoded accept key>
3736+
3737+
### Prototype
3738+
```c
3739+
struct aws_http_message *aws_http_message_new_websocket_handshake_response( struct aws_allocator *allocator, struct aws_byte_cursor accept_key);
3740+
```
3741+
"""
3742+
function aws_http_message_new_websocket_handshake_response(allocator, accept_key)
3743+
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)
3744+
end
3745+
3746+
"""
3747+
aws_websocket_upgrade(allocator, stream, options)
3748+
3749+
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.
3750+
3751+
### Prototype
3752+
```c
3753+
struct aws_websocket *aws_websocket_upgrade( struct aws_allocator *allocator, struct aws_http_stream *stream, const struct aws_websocket_server_upgrade_options *options);
3754+
```
3755+
"""
3756+
function aws_websocket_upgrade(allocator, stream, options)
3757+
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)
3758+
end
3759+
36593760
"""
36603761
Documentation not found.
36613762
"""

0 commit comments

Comments
 (0)