Dear all,
Under unix/linux/mac, there is a dup() function to duplicated a file 
descriptor,  while under windows (since vista) there are WSADuplicateSocket and 
WSASocket to do that.
Now apr_socket_t type doesn’t have that API, but has apr_os_sock_get to get 
system socket from apr socket and apr_os_sock_put/apr_os_sock_make to make apr 
socket from system socket.

My question is can I implement a API like:
apr_socket_dup(apr_socket_t** duplicated, apr_socket_t* sock);
{
    //step1, get system sock
    //step2, duplicate the system sock
    //step3, make a new apr socket with the duplicated socket
   //step4, return the new apr socket.
}

Can you provide this API in the future?

TROY Represents Oh Yeah! :)

Reply via email to