C # Simple DataSocket Example

I am new to programming on socket socket. I am trying to create a simplified application that can detect when a client application connects to a server application. When connecting, I want to send 1 part of the information to the server and get 1 response back (confirmation). Afterwards, I just want to know when the connection will break. In my application, I should not immediately know when the connection is broken, only during the timeout, if this is normal.

Can someone please help me understand what I need to do to do this. The source code example will be nice, again I'm a novice programmer, and this topic is much higher than my head. I need help with the client application and the server application.

Thanks in advance!

Jorel

+3
source share
1 answer

I would not start with sockets if I were a novice programmer. This is not an easy question, and you need to know more than just send some of the information. You need to know how the protocols work and how to deal with their way of sending / receiving information.

I would recommend you use wcf instead, since WCF takes care of all the lower level details for you. You just need to know how to send and receive information.

+1
source

All Articles