implement event target methods
throw exception when sending while connection is not open