# FixIO Documentation

Back to summary

`import "io/websocket";`

## WebSocket class

WebSocket server.

### Initialization

`static function create_server(conn: TCPConnection): WebSocket`
  Creates a new WebSocket server for the TCP connection.

### Functions

`function receive(): Byte[]
function receive(max_size: Integer): Byte[]
function receive_wait(timeout: Integer): Byte[]
function receive_wait(max_size: Integer, timeout: Integer): Byte[]
`
  Receives a message with optional timeout.
`function send(msg: Byte[])`
  Sends a message.