简体   繁体   中英

SignalR: how Server can establish connection to Client?

Is it possible to implement this kind of logic:

Server establishes connection to Client. Then the Client uses this connection to send requests/responses to the Server?

That is ac# pair: client and server apps.

SignalR? Websockets?

In SignalR, a client app can connect to a SignalR Hub on a Server. Once connected, the client app can call methods defined in the SignalR Hub on the server, and the server can use SignalR to call methods on the client. The client app in this example can be JavaScript running in a web page, or a .NET client.

Note that there's no way for the server to initiate a connection from a SignalR Hub to a client. The client app will always have to initiate the connection.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM