Sets up events for the client.
The connect events to setup.
The disconnect events to setup.
The receive events to setup.
The error events to setup.
See Implementation
Sets up events for the client.