简体   繁体   中英

SignalR connect to client from server

is it possible to connect to a client from a server using SignalR if I know the IP/Port the client is running on? All examples I see online are about clients connecting to servers. But I need it the other way around as all my configuration is stored in the server application (like the IPs/Ports of all clients).

The original scenario for SignalR is for web servers to be able to push data out to connected clients. This means you don't know the IP address. Your visitors might be using all kinds of devices and connections. It feels like what you're trying to do here is (ab)use SignalR for a more traditional client-server scenario.

What you're trying to do can be done very easy using the Socket class .

You can find some examples here .

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