connecting and disconnecting client
Add emitting events