* fhandler.h (class fhandler_socket): Add class members and methods

to store and retrieve the SO_RCVBUF and SO_SNDBUF sizes.
	* fhandler_socket.cc (fhandler_socket::dup): Duplicate new members.
	(fhandler_socket::send_internal): Check for SO_SNDBUF size and
	restrict send to 1 byte less per KB 823764.  Leave loop immediately
	if WSASendMsg has been used.
	* net.cc (fdsock): Change comment again.  Set buffer sizes to 65536.
	Store values in fhandler_socket.
	(cygwin_setsockopt): Store SO_RCVBUF and SO_SNDBUF sizes in
	fhandler_socket.
	(cygwin_sendto): Drop call to sig_dispatch_pending.
	(cygwin_recvfrom): Ditto.
	(cygwin_recvmsg): Ditto.
	(cygwin_sendmsg): Ditto.
This commit is contained in:
Corinna Vinschen
2009-07-01 09:16:17 +00:00
parent b4fa816474
commit 975a630109
4 changed files with 68 additions and 17 deletions

View File

@ -445,6 +445,15 @@ class fhandler_socket: public fhandler_base
int af_local_connect ();
void af_local_set_sockpair_cred ();
private:
int _rmem;
int _wmem;
public:
int &rmem () { return _rmem; }
int &wmem () { return _wmem; }
void rmem (int nrmem) { _rmem = nrmem; }
void wmem (int nwmem) { _wmem = nwmem; }
private:
char *sun_path;
struct status_flags