You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mod.rs
    path of file: ./repos/TheReader/crates/frontend/src/services/websocket
    
    the code of the file until where you have to start completion: use common_local::ws::WebsocketResponse;
use futures::{
    channel::mpsc::{channel, Receiver, Sender},
    stream::{SplitSink, SplitStream},
    SinkExt, StreamExt,
};
use gloo_timers::future::TimeoutFuture;
use gloo_utils::window;
use r
    
pub fn open_websocket_conn() {
    let secure = window()
        .location()
        .protocol()
        .unwrap_throw()
        .starts_with("https");

    info!("Secure? {secure}");

    let ws_type = if secure { "wss" } else { "ws" };

    let url = format!("{ws_type}://{}", as_local_path_without_http("/ws/"));

    let ws = WebSocket::open(&url).unwrap();

    info!("Connected to WS: {}", url);

    // Split Websocket
    let (write, read) = ws.split();

    // Create Channel. Currently used for Ping/Pong.
    let (send, recieve) = channel::<WebsocketResponse>(1000);

    create_outgoing_writer(write, recieve);
    create_incoming_reader(read, send);
}