package com.example.fitbot.util.server;

import java.net.Socket;

public class WebSocketConnection {

    private final WebSocket origin;
    private final Socket socket;

    /**
     * Constructor for creating an arbitrary WebSocket connection (Client)
     * @param connection The server connection
     * @param socket The client socket
     */
    public WebSocketConnection(WebSocket connection, Socket socket) {
        this.origin = connection;
        this.socket = socket;
    }

    /**
     * Getter method for retrieving the WebSocket connection
     * @return The WebSocket instance.
     */
    public WebSocket getOrigin() {
        return origin;
    }

    /**
     * Getter method for retrieving the Client Socket connection.
     * @return The Socket connection.
     */
    public Socket getSocket() {
        return socket;
    }
}
