3
我想在服務器類的HandleConnectionAsync方法中保持打開的tcp連接。它將從客戶端接收持續更新。從異步方法獲取更新時的C#封裝
我希望能收到讀者付諸dataFromClient更新,而不必把我的代碼在我的服務器實現類之中。 所以:
static void Main(string[] args)
{
Server s = new Server();
s.start();
//get dataFromClient as it comes in here
}
問題是我不知道如何做到這一點。某種回調或事件?
謝謝,那正是我所需要的。 –