Skip to content

Rebuild backend tcp server connection #13

@jackrizza

Description

@jackrizza

Currently GUI -> [Payload + Callback Address] -> Backend then Backend -> [Payload] -> Callback Address the current reason for this is because of multiple view I believe this will also be use for multi user connections and shared projects the issue is that the current envelope is incorrect :

#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum Copper<T> {
    ToClient {
        client_id: String,
        payload: T,
    },
    ToServer {
        client_id: String,
        callback_address: String,
        payload: T,
    },
    RemoveClient {
        client_id: String,
        callback_address: String,
    },
}

instead it should function as :

#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum Copper<A, T> {
    Ping,

    // or Log In Client
    NewClient {                          
        client_id: String,
        auth: A,
        callback_address: String,
        version: u8,
    },
    Request {
        client_id: String,
        auth: A,
        request: T,
        callback_address: String,
        version: u8,
    },

    // or Log out Client
    RemoveClient {                          
        client_id: String,
        auth: A,
        callback_address: String,
        version: u8,
    },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions