package com.backendsys.modules.sdk.comfyui.service;

import reactor.core.publisher.Mono;

import java.util.Map;

public interface ComfyuiSocketService {

    // [ComfyUI] 创建 WebSocket 监听连接
    Mono<Void> connect(String clientId, Integer port);

    // [ComfyUI] 创建 WebSocket 监听连接 (转发到 SSE)
    Mono<Void> connectToSse(String clientId, Integer port);
    Mono<Void> connectToSse(String clientId, Integer port, Boolean is_save);
    Mono<Void> connectToSse(String clientId, Integer port, Boolean is_save, Map<String, Object> params);

    // 如果是在 websocket 周期，则需要手动输入 user_id
    Mono<Void> connectToSse(String clientId, Integer port, Boolean is_save, Map<String, Object> params, Long input_user_id);

    // [ComfyUI] 断开 WebSocket 监听连接
    Mono<Void> disconnect(String clientId);

}
