From 8383d72a1526ee8f76aea8950779a2dd6382cc35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Mon, 9 Dec 2013 16:00:06 +0100 Subject: [PATCH] Attempt to fix compilation of the libev driver. --- source/vibe/core/drivers/libev.d | 44 +++++++++++++++++--------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/source/vibe/core/drivers/libev.d b/source/vibe/core/drivers/libev.d index 93d3ea8346..3d4e9b7c76 100644 --- a/source/vibe/core/drivers/libev.d +++ b/source/vibe/core/drivers/libev.d @@ -275,6 +275,11 @@ class LibevManualEvent : ManualEvent { return ec; } + int wait(Duration timeout, int reference_emit_count) + { + assert(false, "Not implemented!"); + } + void acquire() { auto task = Task.getThis(); @@ -476,6 +481,25 @@ class LibevTCPConnection : TCPConnection { } @property Duration readTimeout() const { return m_readTimeout; } + @property bool connected() const { return m_socket >= 0; } + + @property bool dataAvailableForRead(){ return m_readBufferContent.length > 0; } + + @property string peerAddress() const { return "xxx"; } // TODO! + @property NetworkAddress localAddress() const { return NetworkAddress.init; } // TODO! + @property NetworkAddress remoteAddress() const { return NetworkAddress.init; } // TODO! + + @property bool empty() { return leastSize == 0; } + + @property ulong leastSize() + { + if( m_readBufferContent.length == 0 ){ + readChunk(); + //assert(m_readBufferContent.length > 0); + } + return m_readBufferContent.length; + } + void close() { //logTrace("closing"); @@ -503,15 +527,6 @@ class LibevTCPConnection : TCPConnection { } - @property bool connected() const { return m_socket >= 0; } - - @property bool dataAvailableForRead(){ return m_readBufferContent.length > 0; } - - @property string peerAddress() const - { - return "xxx"; - } - bool waitForData(Duration timeout) { if (!m_readBufferContent.empty) return true; @@ -527,17 +542,6 @@ class LibevTCPConnection : TCPConnection { return readChunk(true); } - @property bool empty() { return leastSize == 0; } - - @property ulong leastSize() - { - if( m_readBufferContent.length == 0 ){ - readChunk(); - //assert(m_readBufferContent.length > 0); - } - return m_readBufferContent.length; - } - const(ubyte)[] peek() { return null;