Signalr Windows应用程序中的信号器

Signalr Windows应用程序中的信号器,signalr,signalr-hub,signalr.client,Signalr,Signalr Hub,Signalr.client,请问,有谁能举例说明如何在windows应用程序中实现signalR。 我需要在服务器端启动时显示一个消息框 thnx很多连接的启动方法是一种异步方法。您必须调用Task类的ConinueWith方法 var connection = new HubConnection("http://localhost:port-no"); IHubProxy hub = connection.CreateProxy("hub-name"); connection.Start().ContinueWith((

请问,有谁能举例说明如何在windows应用程序中实现signalR。 我需要在服务器端启动时显示一个消息框
thnx很多

连接的启动方法是一种异步方法。您必须调用Task类的ConinueWith方法

var connection = new HubConnection("http://localhost:port-no");
IHubProxy hub = connection.CreateProxy("hub-name");
connection.Start().ContinueWith((t) => { MessageBox.Show("Your-message"); });