use socket on connect event at client