Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' into no_string_bindings

* master:
  Fix some compile warnings
  Fix UDP support for kqueue
  • Loading branch information...
commit 9d9d5e99ae13b7ea18cc7a8cbeaf58552e465928 2 parents 195ec22 + 0a597f0
@tmm1 tmm1 authored
Showing with 15 additions and 5 deletions.
  1. +10 −0 ext/ed.cpp
  2. +1 −1  ext/ed.h
  3. +3 −3 ext/em.cpp
  4. +1 −1  ext/ssl.h
View
10 ext/ed.cpp
@@ -1473,6 +1473,10 @@ void DatagramDescriptor::Write()
assert (MyEventMachine);
MyEventMachine->Modify (this);
#endif
+ #ifdef HAVE_KQUEUE
+ if (SelectForWrite())
+ MyEventMachine->ArmKqueueWriter (this);
+ #endif
}
@@ -1521,6 +1525,9 @@ int DatagramDescriptor::SendOutboundData (const char *data, int length)
assert (MyEventMachine);
MyEventMachine->Modify (this);
#endif
+ #ifdef HAVE_KQUEUE
+ MyEventMachine->ArmKqueueWriter (this);
+ #endif
return length;
}
@@ -1576,6 +1583,9 @@ int DatagramDescriptor::SendOutboundDatagram (const char *data, int length, cons
assert (MyEventMachine);
MyEventMachine->Modify (this);
#endif
+ #ifdef HAVE_KQUEUE
+ MyEventMachine->ArmKqueueWriter (this);
+ #endif
return length;
}
View
2  ext/ed.h
@@ -221,12 +221,12 @@ class ConnectionDescriptor: public EventableDescriptor
bool bSslVerifyPeer;
bool bSslPeerAccepted;
#endif
- bool bIsServer;
#ifdef HAVE_KQUEUE
bool bGotExtraKqueueEvent;
#endif
+ bool bIsServer;
Int64 LastIo;
int InactivityTimeout;
View
6 ext/em.cpp
@@ -85,11 +85,11 @@ EventMachine_t::EventMachine_t (void (*event_callback)(const unsigned long, int,
LoopBreakerReader (-1),
LoopBreakerWriter (-1),
bEpoll (false),
+ epfd (-1),
bKqueue (false),
kqfd (-1),
- epfd (-1),
- inotify (NULL),
- HeartbeatInterval(2)
+ HeartbeatInterval(2),
+ inotify (NULL)
{
// Default time-slice is just smaller than one hundred mills.
Quantum.tv_sec = 0;
View
2  ext/ssl.h
@@ -75,9 +75,9 @@ class SslBox_t
protected:
SslContext_t *Context;
- bool bVerifyPeer;
bool bIsServer;
bool bHandshakeCompleted;
+ bool bVerifyPeer;
SSL *pSSL;
BIO *pbioRead;
BIO *pbioWrite;
Please sign in to comment.
Something went wrong with that request. Please try again.