sock_recvmsg in Kernel hangs for 10 seconds

From: Lee Chin (leechin@mail.com)
Date: Fri May 12 2000 - 20:22:07 EST


Hello,
It must be something wrong that I am doing, but once in a while the
following sock_recvmsg hangs for 10 seconds even though the client the
socket is connected to has returned all data...
iov.iov_base = buffer;
iov.iov_len = (size_t)(8*1024);

msg.msg_name = 0;
msg.msg_namelen = 0;
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
msg.msg_control = 0;
msg.msg_controllen = 0;
msg.msg_flags = 0;

printk("Calling recvmsg... ");

while(sock_recvmsg(server, &msg, iov.iov_len, MSG_WAITALL) > 0)
{
/* nothing */
}

How do I fix this?

Sincerely,
Lee

------Original Message------
From: Tigran Aivazian <tigran@veritas.com>
To: Lee Chin <leechin@mail.com>
Sent: May 10, 2000 8:26:52 AM GMT
Subject: Re: sendmsg in Kernel

On Tue, 9 May 2000, Lee Chin wrote:

> Hello,
> I want to be able to open a TCP socket, listen for connections and call
> sendmsg to a client from with in the kernel... I tried different ways of
> doing this... but I just cant figure it out.
> Can some one help me?
>
> Sincerely,
> Lee

why not have a look at net/khttp/sockets.c?

Regards,
Tigran

______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:22 EST