Add socketChannel test code