connect, disconnect, send methods and events