changed sock_read() in some files to sock_gets().