mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
broker/main: Deprecate Broker::listen_websocket()
Optimistically deprecate Broker::listen_websocket() and promote Cluster::listen_websocket() instead.
This commit is contained in:
parent
b9569cb06f
commit
a7423104e1
2 changed files with 6 additions and 1 deletions
|
@ -333,7 +333,8 @@ export {
|
||||||
## .. zeek:see:: Broker::status
|
## .. zeek:see:: Broker::status
|
||||||
global listen_websocket: function(a: string &default = default_listen_address_websocket,
|
global listen_websocket: function(a: string &default = default_listen_address_websocket,
|
||||||
p: port &default = default_port_websocket,
|
p: port &default = default_port_websocket,
|
||||||
retry: interval &default = default_listen_retry): port;
|
retry: interval &default = default_listen_retry): port
|
||||||
|
&deprecated="Remove in v8.1. Switch to Cluster::listen_websocket() instead.";
|
||||||
|
|
||||||
## Initiate a remote connection.
|
## Initiate a remote connection.
|
||||||
##
|
##
|
||||||
|
@ -505,7 +506,9 @@ function listen(a: string, p: port, retry: interval): port
|
||||||
|
|
||||||
event retry_listen_websocket(a: string, p: port, retry: interval)
|
event retry_listen_websocket(a: string, p: port, retry: interval)
|
||||||
{
|
{
|
||||||
|
@pragma push ignore-deprecations
|
||||||
listen_websocket(a, p, retry);
|
listen_websocket(a, p, retry);
|
||||||
|
@pragma pop ignore-deprecations
|
||||||
}
|
}
|
||||||
|
|
||||||
function listen_websocket(a: string, p: port, retry: interval): port
|
function listen_websocket(a: string, p: port, retry: interval): port
|
||||||
|
|
|
@ -1644,7 +1644,9 @@ event zeek_init()
|
||||||
|
|
||||||
if ( cni$bound_port != 0/unknown )
|
if ( cni$bound_port != 0/unknown )
|
||||||
{
|
{
|
||||||
|
@pragma push ignore-deprecations
|
||||||
Broker::listen_websocket(cat(cni$address), cni$bound_port);
|
Broker::listen_websocket(cat(cni$address), cni$bound_port);
|
||||||
|
@pragma pop ignore-deprecations
|
||||||
websocket_info = fmt("websocket port %s:%s", cni$address, cni$bound_port);
|
websocket_info = fmt("websocket port %s:%s", cni$address, cni$bound_port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue