Rewrite the socket code in C, fix a bug with some socket, minor performance improvement, but open more performance improvement