On Wed, Oct 22, 2008 at 9:03 PM, Vlad Seryakov <[EMAIL PROTECTED]> wrote:
> I tried to use Ns_SockSendBufs() but it sends data directly to socket
> where i need to send via driver's send proc.
Just pass your Send() proc directly, and delete SendBufs():
static ssize_t
SendFile(Ns_Sock *sock, Ns_FileVec *bufs, int nbufs, Ns_Time
*timeoutPtr, int flags)
{
- return Ns_SockSendFileBufsIndirect(sock->sock, bufs, nbufs,
timeoutPtr, flags, SendBufs);
+ return Ns_SockSendFileBufsIndirect(sock->sock, bufs, nbufs,
timeoutPtr, flags, Send);
}
> Why connPtr->nContentSent is not updated, all send called with conn
> parameters should do this
Yes, but Ns_ConnSend() is higher up the stack, so when sending data it
looks something like this:
return.c: Ns_ConnReturnData
connio.c: Ns_ConnWriteData
connio.c: Ns_ConnWriteVData
connio.c: Ns_ConnSend
driver.c: NsDriverSend
nsssl/nsssl.c: Send
By the time your Send() is called we've already passed through
Ns_ConnSend(). nContentSent will be updated as the stack unwinds.
If you call Ns_ConnSend() from within Send(), that's a loop...
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
naviserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/naviserver-devel