EV-Websockets
view release on metacpan or search on metacpan
Websockets.xs view on Meta::CPAN
info.vhost_name = "default";
if (proxy && strlen(proxy) > 0) {
DEBUG_LOG("Context using proxy: %s:%d", proxy, proxy_port);
info.http_proxy_address = proxy;
info.http_proxy_port = proxy_port;
}
if (ssl_cert && strlen(ssl_cert) > 0) {
info.ssl_cert_filepath = ssl_cert;
info.ssl_private_key_filepath = ssl_key;
if (ssl_ca && strlen(ssl_ca) > 0)
info.ssl_ca_filepath = ssl_ca;
}
DEBUG_LOG("Creating context (manual integration)");
RETVAL->lws_ctx = lws_create_context(&info);
if (RETVAL->lws_ctx == NULL) {
Safefree(RETVAL);
croak("Failed to create libwebsockets context");
Websockets.xs view on Meta::CPAN
memset(&info, 0, sizeof(info));
info.port = port;
info.protocols = srv->protocol_name ? srv->vhost_protocols : protocols;
info.vhost_name = name;
info.user = srv;
info.options = 0;
if (ssl_cert && ssl_key) {
info.ssl_cert_filepath = ssl_cert;
info.ssl_private_key_filepath = ssl_key;
if (ssl_ca)
info.ssl_ca_filepath = ssl_ca;
info.options |= LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT;
}
vh = lws_create_vhost(self->lws_ctx, &info);
if (vh == NULL) {
if (on_connect) SvREFCNT_dec(on_connect);
if (on_message) SvREFCNT_dec(on_message);
if (on_close) SvREFCNT_dec(on_close);
( run in 2.882 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )