Add a few more events

This commit is contained in:
Alex Hultman
2018-12-21 04:31:37 +01:00
parent 4a2cd93a22
commit 3fa0fbc5fa
7 changed files with 91 additions and 49 deletions
+7
View File
@@ -95,6 +95,13 @@ protected:
}
}
/* Returns the user space backpressure. */
int getBufferedAmount() {
AsyncSocketData<SSL> *asyncSocketData = (AsyncSocketData<SSL> *) getExt();
return asyncSocketData->buffer.size();
}
/* Write in three levels of prioritization: cork-buffer, syscall, socket-buffer. Always drain if possible.
* Returns pair of bytes written (anywhere) and wheter or not this call resulted in the polling for
* writable (or we are in a state that implies polling for writable). */