chickadee » websockets » send-message

(send-message data #!optional (message-type 'text) (ws (current-websocket)))procedure

Send a message to the client. data is a string or u8vector to be sent to the client. message-type is one of the types listed under the message-types section and defaults to 'text. Usually this will be 'text or 'binary but any valid type is allowed. Note that if the data argument is a u8vector it must be copied before being sent due to some CHICKEN internal limitations, strings will not be. send-message also takes an optional websocket object that is bound to (current-websocket) by default.

This method is thread safe.

A list of the possible message types (symbols):

  • 'text
  • 'binary
  • 'ping