Good day. For learning purposes, I am writing a chat on the TCP protocol. In the console version, everything is fine, the chat normally sends messages to the server, and the server sends to all clients. But once I transfer this code to WPF, that's all. The client starts sending empty requests to the server. As a result, the server is clogged up with this.
And in the console version, all is well 
Server - http://pastebin.com/c2Ru2j30
Console working version - http://pastebin.com/0707wqKu
Not working WPF - http://pastebin.com/CLpRUGKG
