use mrevent to protect socket connection
improve connect command
improve connect command