Skip to content

Commit

Permalink
curl: add support for Web Sockets (experimental, disabled per default)
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit-pierre committed Mar 28, 2024
1 parent 717bac0 commit 3194321
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
20 changes: 20 additions & 0 deletions subprojects/packagefiles/curl/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,24 @@ idn_opt = idn_opt.require(

# }}}

# Web sockets. {{{

ws_opt = get_option(
'websockets',
).require(
http_opt.allowed(),
error_message: HTTP_DISABLED_ERROR,
).require(
cdata.get('SIZEOF_CURL_OFF_T') > 4,
error_message: 'curl_off_t is too small to enable WebSockets support',
)

cdata.set('USE_WEBSOCKETS', ws_opt.allowed())

wss_opt = ws_opt.allowed() and ssl_opt.allowed() ? ws_opt : DISABLED_OPT

# }}}

# ZLIB. {{{

libz_opt = get_option('libz')
Expand Down Expand Up @@ -1669,6 +1687,8 @@ foreach _section, _optlist : {
['SMTPS'],
['TELNET'],
['TFTP'],
['WS'],
['WSS'],
],
'ssl_backends': [
['OpenSSL'],
Expand Down
1 change: 1 addition & 0 deletions subprojects/packagefiles/curl/meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ option('socketpair' , type: 'feature', value: 'enabled')
option('sspi' , type: 'feature')
option('unixsockets' , type: 'feature')
option('verbose-strings', type: 'feature', value: 'enabled')
option('websockets' , type: 'feature', value: 'disabled')
option('zstd' , type: 'feature')

# Asynchronous DNS.
Expand Down
6 changes: 6 additions & 0 deletions subprojects/packagefiles/curl/tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ if not get_option('curldebug')
'!1908',
'!1972',
'!2100',
'!2300',
'!2301',
'!2302',
'!2303',
'!2304',
'!2307',
]
endif
if ipv6_opt.disabled()
Expand Down

0 comments on commit 3194321

Please sign in to comment.