Skip to content

Commit

Permalink
Attempt to fix compilation of the libev driver.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Dec 9, 2013
1 parent ab9a536 commit 8383d72
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions source/vibe/core/drivers/libev.d
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 8383d72

Please sign in to comment.