Pass client socket directly to the IOWatcher
This commit is contained in:
@ -257,7 +257,7 @@ class IOCPLoop : Loop
|
||||
auto socket = listener.endAccept(overlapped);
|
||||
auto protocol = connection.protocol;
|
||||
auto transport = MmapPool.instance.make!IOCPStreamTransport(socket, protocol);
|
||||
auto io = MmapPool.instance.make!IOWatcher(transport, protocol);
|
||||
auto io = MmapPool.instance.make!IOWatcher(transport, socket, protocol);
|
||||
|
||||
connection.incoming.enqueue(io);
|
||||
|
||||
|
@ -282,12 +282,12 @@ abstract class SelectorLoop : Loop
|
||||
}
|
||||
if (io is null)
|
||||
{
|
||||
io = MmapPool.instance.make!IOWatcher(transport, protocol);
|
||||
io = MmapPool.instance.make!IOWatcher(transport, client, protocol);
|
||||
connections[client.handle] = io;
|
||||
}
|
||||
else
|
||||
{
|
||||
io(transport, protocol);
|
||||
io(transport, client, protocol);
|
||||
}
|
||||
|
||||
reify(io, EventMask(Event.none), EventMask(Event.read, Event.write));
|
||||
|
Reference in New Issue
Block a user