/// The state that the websocket stream is currently in
pub enum StreamState {
    /// The stream is connecting - the handshake has not finished
    Connecting,
    /// The stream is open - data can be sent
    Open,
    /// The stream is closing - no more data can be sent
    Closing,
    /// The stream is closed
    Closed
}