add socket connection and event