Hi,
Thanks for the response...
However, in my case, the Kernel does a
1. sock_sendmsg(... THE REQUEST ...)
2. sock_recvmsg(... THE RESPONSE FROM THE SERVER ...)
I really need the connection open so I can do this in a loop, requesting
various services of the server. When I run the same code in user mode, it
works fine. I have no control over the server (I cant change its code to
close the connection) and also, that is not the protocol in this case.
I would appreciate any advise as I am unfamiliar with these issues.
Sincerely,
Lee
------Original Message------
From: "David S. Miller" <davem@redhat.com>
To: leechin@mail.com
Sent: May 13, 2000 2:10:03 AM GMT
Subject: Re: sock_recvmsg in Kernel hangs for 10 seconds
Date: Fri, 12 May 2000 21:22:07 -0400 (EDT)
From: Lee Chin <leechin@mail.com>
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...
...
How do I fix this?
Make the server close the socket when it's sent all the data.
The kernel has no idea if "all the data" has been sent until it sees
the close from the sender, but the kernel does use a timeout so that
you do not block forever in MSG_WAITALL if the server does not close
the connection.
Later,
David S. Miller
davem@redhat.com
______________________________________________
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:23 EST