The OpenD Programming Language

Curl.onSocketOption

The event handler that gets called when the net socket has been created but a connect() call has not yet been done. This makes it possible to set misc. socket options.

struct Curl
@property
void
onSocketOption

Parameters

callback int delegate

the callback that receives the socket and socket type etc.c.curl.CurlSockType

Return Value

Type: void

Return 0 from the callback to signal success, return 1 to signal error and make curl close the socket

Examples

import std.net.curl;
Curl curl;
curl.initialize();
curl.set(CurlOption.url, "http://dlang.org");
curl.onSocketOption = delegate int(curl_socket_t s, CurlSockType t) { /+ do stuff +/ };
curl.perform();

Meta