feat: ws实现

This commit is contained in:
MatrixSeven
2025-09-16 16:41:38 +08:00
parent 15d23de5a7
commit 2fc478e889
18 changed files with 780 additions and 775 deletions

View File

@@ -4,7 +4,7 @@ import { ConnectionStatus } from '@/components/ConnectionStatus';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { useToast } from '@/components/ui/toast-simple';
import { useSharedWebRTCManager } from '@/hooks/connection';
import { useConnectManager } from '@/hooks/connection';
import { useFileTransferBusiness } from '@/hooks/file-transfer';
import { useTextTransferBusiness } from '@/hooks/text-transfer';
import { Download, Image, MessageSquare } from 'lucide-react';
@@ -37,7 +37,7 @@ export const WebRTCTextReceiver: React.FC<WebRTCTextReceiverProps> = ({
const hasTriedAutoConnect = useRef(false);
// 创建共享连接
const connection = useSharedWebRTCManager();
const connection = useConnectManager();
const {getConnectState} = connection;