#include "base/AsyncCall.h"
#include "comm_err_t.h"
-namespace Comm {
+namespace Comm
+{
/// Type of IO callbacks the Comm layer deals with.
typedef enum {
} iocb_type;
/// Details about a particular Comm IO callback event.
-class IoCallback {
+class IoCallback
+{
public:
iocb_type type;
int fd;
/// Entry nodes for the IO callback table: iocb_table
/// Keyed off the FD which the event applies to.
-class CbEntry {
+class CbEntry
+{
public:
int fd;
IoCallback readcb;
assert(clientInfo->quotaPeekFd() == fd);
clientInfo->quotaDequeue(); // we will write or requeue below
- if (nleft > 0) {
+ if (nleft > 0) {
const int quota = clientInfo->quotaForDequed();
if (!quota) { // if no write quota left, queue this fd
state->quotaQueueReserv = clientInfo->quotaEnqueue(fd);
#include "base/AsyncCall.h"
-namespace Comm {
+namespace Comm
+{
/**
* Queue a write. callback is scheduled when the write
}
} else if (cbdataReferenceValid(this)) {
AsyncCall::Pointer call = commCbCall(5,5, "SomeTunnelWriteHandler",
- CommIoCbPtrFun(completion, this));
+ CommIoCbPtrFun(completion, this));
Comm::Write(to.fd(), from.buf, len, call, NULL);
}