[Asterisk-code-review] res_http_websocket: Add a client connection timeout (asterisk[master])

Sean Bright asteriskteam at digium.com
Tue Jan 18 09:22:25 CST 2022


Attention is currently required from: Kevin Harwell.
Sean Bright has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/17867 )

Change subject: res_http_websocket: Add a client connection timeout
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

File include/asterisk/http_websocket.h:

https://gerrit.asterisk.org/c/asterisk/+/17867/comment/3bd074ff_556814e1 
PS1, Line 465: AST_OPTIONAL_API(struct ast_websocket *, ast_websocket_client_create_and_connect,
             : 		 (const char *uri, const char *protocols, struct ast_tls_config *tls_cfg,
             : 		  enum ast_websocket_result *result, int timeout), { return NULL;});
Since `result` is effectively an "out" argument, I think `timeout` should be before it.

The function name also doesn't differentiate this function's behavior vs. ast_websocket_client_create() also connects. So maybe `ast_websocket_client_create_timeout()` or `ast_websocket_client_create_with_timeout()`?

Or what about adding a generic `options` struct pointer argument instead of a raw int so that we can extend the interface later without affecting ABI or adding additional arguments?



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/17867
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I5812f6f28d3d13adbc246517f87af177fa20ee9d
Gerrit-Change-Number: 17867
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Sean Bright <sean at seanbright.com>
Gerrit-Attention: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Tue, 18 Jan 2022 15:22:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220118/845ef75f/attachment-0001.html>


More information about the asterisk-code-review mailing list