I am coding an internet cafe program and trying to decide which 开发者_如何学JAVApath to take. I've read some articles and came to know that there are a few ways to implement a server/client connection.(a bit messy Asyncronous, simple TCP and Socket) I'm a bit confused. I kindly ask you to show me the ideal way regarding to the needs that I mentioned below
Clients will always stay connected to server and server will know when any client is disconnected. Server will send object and string to clients, clients will send string to server.
So, Should I use an asyncronous or simple tcp or what? Thanks in advance
Have you looked at WCF?
There are quite a few good tutorials out there to help you get started on this.
It sounds like you have the basic functionality in mind, so take a look at this tutorial - hopefully it can help you out.
http://www.codeproject.com/KB/IP/tcpclientserver.aspx
Also you can look this site for basic requirements http://www.java2s.com/Code/CSharp/Network/CatalogNetwork.htm
精彩评论