You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i got this error when i recreated the vhost by lws_create_vhost with the same port different tls certification in lws version 4.3 E: [null wsi]: lws_socket_bind: ERROR on binding fd 266 to port 7683 (-1 98)
E: [vh|4|websockets||7683]: lws_create_vhost: init server failed
E: Failed to recreate WebSocket vhost
should i wait some time to call lws_create_vhost or could i set SO_REUSEADDR Socket Option somehow? thanks! @lws-team
The text was updated successfully, but these errors were encountered:
How is that going to help? If you open two different listening sockets on the same port, what is the OS supposed to do so that stuff for socket a gets seen by socket a and not b?
Lws can handle multiple vhosts listening on the same socket at the same port. You must ensure the .name of each vhost is different, and matches what would be seen at the host: header. Eg, warmcat.com and libwebsockets.org are vhosts that both exist at :443. routing to which vhost is handled after seeing which host the connecting client actually wanted. Then the right certs are passed back and it is hooked up to the correct logical vhost.
How is that going to help? If you open two different listening sockets on the same port, what is the OS supposed to do so that stuff for socket a gets seen by socket a and not b?
Lws can handle multiple vhosts listening on the same socket at the same port. You must ensure the .name of each vhost is different, and matches what would be seen at the host: header. Eg, warmcat.com and libwebsockets.org are vhosts that both exist at :443. routing to which vhost is handled after seeing which host the connecting client actually wanted. Then the right certs are passed back and it is hooked up to the correct logical vhost.
Hi Andy,
sorry for misunderstanding, i have destroy the last vhost before recreated the vhost by lws_create_vhost with the same port. Sometime i got this error even i have slept 5 seconds before recreated the vhost(destroy the vhost--------sleep 5 seconds---------create vhost with the same port). @lws-team
Hi Andy,
i got this error when i recreated the vhost by lws_create_vhost with the same port different tls certification in lws version 4.3
E: [null wsi]: lws_socket_bind: ERROR on binding fd 266 to port 7683 (-1 98)
E: [vh|4|websockets||7683]: lws_create_vhost: init server failed
E: Failed to recreate WebSocket vhost
should i wait some time to call lws_create_vhost or could i set SO_REUSEADDR Socket Option somehow? thanks! @lws-team
The text was updated successfully, but these errors were encountered: