How to implement a chat client-server application c#?
This action takes place in the game I still being written in c# wpf(TIC-TAC-toe for Corsica).
Did the user authorization, creation of lobbies and similar things by means of requests to the server, everything is clear, but not clear how to make the lobby chat between the two players. I think that using the queries do not work (maybe something I do not know) then how ?
Alternatively, you can create a separate thread and communicate with the server in a loop, but it is in my opinion the extra load and this thread will prevent others from my requests to the server (probably, haven't tried)
UPD. Guilty, that is not written using. Using sockets, the tcp Protocol.
ellis_Greenfelde answered on April 19th 20 at 12:16
For such things a library SignalR, with lots of examples of how to write chat, for example.
In General, I advise to dig in this side.
lonie answered on April 19th 20 at 12:18
You write that "by means of queries to the server" but does not indicate that it's for the server.
If it's a web server, then it is easier to use WebSocket that .net SignalR is implemented by the framework.
If not web, then directly to work with TCP sockets.