the callback that receives the socket and socket type etc.c.curl.CurlSockType
Return 0 from the callback to signal success, return 1 to signal error and make curl close the socket
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();
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.