Adjust kqueue build
This commit is contained in:
parent
a012ca4003
commit
c41fa2e98f
@ -241,10 +241,10 @@ final class KqueueLoop : SelectorLoop
|
|||||||
// If it is a ConnectionWatcher. Accept connections.
|
// If it is a ConnectionWatcher. Accept connections.
|
||||||
if (transport is null)
|
if (transport is null)
|
||||||
{
|
{
|
||||||
auto connection = cast(ConnectionWatcher) connections[events[i].data.fd];
|
auto connection = cast(ConnectionWatcher) connections[events[i].ident];
|
||||||
assert(connection !is null);
|
assert(connection !is null);
|
||||||
|
|
||||||
acceptConnections(connections[events[i].ident]);
|
acceptConnections(connection);
|
||||||
}
|
}
|
||||||
else if (events[i].flags & EV_ERROR)
|
else if (events[i].flags & EV_ERROR)
|
||||||
{
|
{
|
||||||
@ -303,8 +303,12 @@ final class KqueueLoop : SelectorLoop
|
|||||||
* Params:
|
* Params:
|
||||||
* transport = Transport.
|
* transport = Transport.
|
||||||
* exception = Exception thrown on sending.
|
* exception = Exception thrown on sending.
|
||||||
|
*
|
||||||
|
* Returns: $(D_KEYWORD true) if the operation could be successfully
|
||||||
|
* completed or scheduled, $(D_KEYWORD false) otherwise (the
|
||||||
|
* transport will be destroyed then).
|
||||||
*/
|
*/
|
||||||
protected override void feed(StreamTransport transport,
|
protected override bool feed(StreamTransport transport,
|
||||||
SocketException exception = null) @nogc
|
SocketException exception = null) @nogc
|
||||||
{
|
{
|
||||||
if (!super.feed(transport, exception))
|
if (!super.feed(transport, exception))
|
||||||
|
@ -149,8 +149,12 @@ abstract class SelectorLoop : Loop
|
|||||||
* Params:
|
* Params:
|
||||||
* transport = Transport.
|
* transport = Transport.
|
||||||
* exception = Exception thrown on sending.
|
* exception = Exception thrown on sending.
|
||||||
|
*
|
||||||
|
* Returns: $(D_KEYWORD true) if the operation could be successfully
|
||||||
|
* completed or scheduled, $(D_KEYWORD false) otherwise (the
|
||||||
|
* transport will be destroyed then).
|
||||||
*/
|
*/
|
||||||
protected void feed(StreamTransport transport,
|
protected bool feed(StreamTransport transport,
|
||||||
SocketException exception = null) @nogc
|
SocketException exception = null) @nogc
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@ -184,7 +188,9 @@ abstract class SelectorLoop : Loop
|
|||||||
assert(watcher !is null);
|
assert(watcher !is null);
|
||||||
|
|
||||||
kill(watcher, exception);
|
kill(watcher, exception);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user