public void Start() { _client = new LocalClient(); _client.OnConnected += Connected; _client.OnReceiveObject += ReceiveObject; _client.Start(); }
//Winform서버 Start 함수 생성 public void Start() { try { _listener.Start(); //서버생성 TcpClient tcpClient = _listener.AcceptTcpClient(); //서버 받는 winform 클라이언트 대기 _localClient = new LocalClient(tcpClient); //winform 클라이언트로 클라이언트클래스 생성 _localClient.OnReceiveObject += ReceiveObject; //받는 값 더해주기 _localClient.Start(); //클라이언트 시작 } catch (Exception) { }//try }