func (c *Client) sendHeartbeat(conn *websocket.Conn) error { hbMsg := Event{ Topic: "phoenix", Event: "heartbeat", Payload: []byte("{}"), Ref: c.makeRef(), } return conn.WriteJSON(&hbMsg) }