Click here to Skip to main content
15,890,882 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,

i want to use my tcp server and client in same pc.
does it possible?

What I have tried:

nothing special
creating code
testing same pc
Posted
Updated 17-Mar-16 21:24pm
Comments
Peter_in_2780 18-Mar-16 3:02am    
Simple. Just use the localhost IP address 127.0.0.1 in your client when you connect.

1 solution

Here is a good article about a Client / Server application in C#5:
Creating a server/client application using native .NET TCP library[^]

As the author says:
Quote:
Note that I would use loop back address (127.0.0.1) and a sample port number (1234) because I am going to use my own machine to act as server and client.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900