Sending custom events from a client to a server