Programming in C# the communication between client and server: How to do it?

35 pts.
Tags:
C#
C# .NET
NET TCP
In one of my exams i have to do a program that communicates with client  using C#. NET TCP. So i ask for help from anyone. 

Software/Hardware used:
Software

Answer Wiki

Thanks. We'll let you know when a new response is added.

You would need to use sockets.

“<i>In computer networking, an Internet socket or network socket is an endpoint of a bidirectional inter-process communication flow across an Internet Protocol-based computer network, such as the Internet</i>.”

Read more about sockets on SearchCIO-Midmarket.

In summary, the server application opens a socket and puts it in ‘listening’ state. Then the client application connects to the server’s listening socket, and after that they can start exchanging messages.

Here’s an article that should get you started:

And a couple example applications (client and server) can be downloaded from here:

Feel free to post any doubts you encounter.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Cwi
    You will need to add threading capabilities if you want more than one connection from multiple clients to the server.
    30 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following