modify for socket event process.