added OOB checking
do_recv now loops (tighter)
not using select() anymore since it was causing deadlock issues
updated CharBuffer to use C++ memory allocation