First look at a screenshot.
At first glance, you may think that the chat program is written with a socket. Tell you, this thing is not to use socket to achieve, oh, of course, its bottom must have a certain relationship with the socket, I just said that my code does not use the socket just.
So, besides the socket can be used for communication, is there any other technology? Yes, first of all, if you are strong enough to use HTTP, but the process of HTTP initialization seems to be relatively slow. So is there any more? Of course, you remember. NET has previously had a very x but very little attention to the technology--remoting. Did you use it? It doesn't matter if it doesn't work, because it already has a substitute.
At this time you must think of WCF is not a "oil" lamp, in fact, in contrast to the use of the socket to write the number of code and maintenance costs, using WCF to write network communication procedures, not only save oil, and save time and effort, the most important is worry. Therefore, people's health, mental health is dominant, you see a psychologically unhealthy person, its body will not be healthy to go, today this disease tomorrow.
So, programming this thing ah, the more worry the better, is conducive to our health, money is never the goal, physical and mental health is living in the world's main theme, as for you believe it or not, anyway, I believe.