mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
additional vhost member accessors
This commit is contained in:
parent
33b40e0ae4
commit
713aab17f8
2 changed files with 42 additions and 0 deletions
|
@ -1472,6 +1472,24 @@ lws_get_vhost_name(struct lws_vhost *vhost)
|
|||
return vhost->name;
|
||||
}
|
||||
|
||||
LWS_VISIBLE LWS_EXTERN int
|
||||
lws_get_vhost_port(struct lws_vhost *vhost)
|
||||
{
|
||||
return vhost->listen_port;
|
||||
}
|
||||
|
||||
LWS_VISIBLE LWS_EXTERN void *
|
||||
lws_get_vhost_user(struct lws_vhost *vhost)
|
||||
{
|
||||
return vhost->user;
|
||||
}
|
||||
|
||||
LWS_VISIBLE LWS_EXTERN const char *
|
||||
lws_get_vhost_iface(struct lws_vhost *vhost)
|
||||
{
|
||||
return vhost->iface;
|
||||
}
|
||||
|
||||
int user_callback_handle_rxflow(lws_callback_function callback_function,
|
||||
struct lws *wsi,
|
||||
enum lws_callback_reasons reason, void *user,
|
||||
|
|
|
@ -3032,6 +3032,30 @@ lws_get_vhost(struct lws *wsi);
|
|||
LWS_VISIBLE LWS_EXTERN const char *
|
||||
lws_get_vhost_name(struct lws_vhost *vhost);
|
||||
|
||||
/**
|
||||
* lws_get_vhost_port() - returns the port a vhost listens on, or -1
|
||||
*
|
||||
* \param vhost: which vhost
|
||||
*/
|
||||
LWS_VISIBLE LWS_EXTERN int
|
||||
lws_get_vhost_port(struct lws_vhost *vhost);
|
||||
|
||||
/**
|
||||
* lws_get_vhost_user() - returns the user pointer for the vhost
|
||||
*
|
||||
* \param vhost: which vhost
|
||||
*/
|
||||
LWS_VISIBLE LWS_EXTERN void *
|
||||
lws_get_vhost_user(struct lws_vhost *vhost);
|
||||
|
||||
/**
|
||||
* lws_get_vhost_iface() - returns the binding for the vhost listen socket
|
||||
*
|
||||
* \param vhost: which vhost
|
||||
*/
|
||||
LWS_VISIBLE LWS_EXTERN const char *
|
||||
lws_get_vhost_iface(struct lws_vhost *vhost);
|
||||
|
||||
/**
|
||||
* lws_json_dump_vhost() - describe vhost state and stats in JSON
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue