C# Simple DataSocket Example Needed
I am new to C# Socket programming. I am trying to build a simplistic application that can detect when a client application connects to the server application. When connected, I want to send 1 piece of information to the server and receive 1 response back (confirmation). Afterwards, I just want to know when the connection is broke. Within my application, I do not have to know instantly when the connection is broken, just within the timeout if fine.
Can someone please help me understand what I need to do to accomplish this. Sample source code would be nice, again I am a novice programmer and this topic is way above my head. I would need help with the client app and server app.
Thanks in advance!
Jor开发者_Python百科el
I would not begin with sockets if I were a novice programmer. It's not an easy subject to start with, and you need to know more than just how to send a piece of information. You need to know how the protocols work too and how do deal with their way of send/receiving information.
I would recommend you to use wcf instead, since WCF takes care of all lower level details for you. You will just need to know how to send and receive information.
精彩评论