Skip to content

Commit 43a5db6

Browse files
committed
Update MemcacheConnection.scala
1 parent 67b1ab6 commit 43a5db6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/com/paulasmuth/sqltap/MemcacheConnection.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@ class MemcacheConnection(pool: MemcacheConnectionPool) extends TimeoutCallback {
147147
idle(event)
148148
}
149149

150+
/**
151+
* Read algo:
152+
* - fill read buffer until at least one response is ready
153+
* - read all full responses from the read buffer
154+
* - copy the remainder of the read buffer to the beginning of the read buffer
155+
*/
150156
def read(event: SelectionKey) : Unit = {
151157
val chunk = sock.read(read_buf)
152158

0 commit comments

Comments
 (0)