From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/ricci/common ClientSocket.cpp Module.cpp
Date: 1 Jun 2007 23:12:22 -0000 [thread overview]
Message-ID: <20070601231222.12688.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Branch: EXPERIMENTAL
Changes by: rmccabe at sourceware.org 2007-06-01 23:12:22
Modified files:
ricci/common : ClientSocket.cpp Module.cpp
Log message:
- Increase read buffers for network traffic from 1k to 4k, and include
errno info in exceptions in the network code.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/common/ClientSocket.cpp.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.7&r2=1.7.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/common/Module.cpp.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.5&r2=1.5.8.1
--- conga/ricci/common/ClientSocket.cpp 2007/03/23 17:25:12 1.7
+++ conga/ricci/common/ClientSocket.cpp 2007/06/01 23:12:22 1.7.2.1
@@ -27,6 +27,7 @@
#include <unistd.h>
#include <errno.h>
+#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
@@ -159,14 +160,14 @@
throw String("ClientSocket::recv(): socket already closed");
while (true) {
- char buffer[1024];
+ char buffer[4096];
int ret = ::recv(_sock, buffer, sizeof(buffer), 0);
if (ret == -1) {
if (errno == EINTR)
continue;
else if (errno == EAGAIN)
return "";
- throw String("ClientSocket::recv(): recv error");
+ throw String("ClientSocket::recv(): recv error: ") + String(strerror(errno));
}
if (ret == 0) {
@@ -204,10 +205,9 @@
if (ret == -1) {
if (errno == EINTR)
continue;
- else if (errno == EAGAIN ||
- errno == EWOULDBLOCK)
+ else if (errno == EAGAIN || errno == EWOULDBLOCK)
return msg;
- throw String("ClientSocket::send(): socket error");
+ throw String("ClientSocket::send(): socket error: ") + String(strerror(errno));
}
// log(String("sent ") + ret + " bytes thru socket " + _sock,
--- conga/ricci/common/Module.cpp 2006/08/15 04:15:52 1.5
+++ conga/ricci/common/Module.cpp 2007/06/01 23:12:22 1.5.8.1
@@ -1,5 +1,5 @@
/*
- Copyright Red Hat, Inc. 2006
+ Copyright Red Hat, Inc. 2006-2007
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -276,7 +276,7 @@
// process event
if (poll_data.revents & POLLIN) {
- char buff[1024];
+ char buff[4096];
int ret = read(poll_data.fd, buff, sizeof(buff));
if (ret == -1) {
if (errno == EINTR)
reply other threads:[~2007-06-01 23:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070601231222.12688.qmail@sourceware.org \
--to=rmccabe@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.