Added listener event for connecting to endpoints