Read from socket until EAGAIN

Signed-off-by: Thorben Hasenpusch <thorben.hasenpusch@gmail.com>