Opening a socket through an RS232 connection

I have a "C # server" program that listens for "127.0.0.1", port 5500 using a .NET socket, and I have a corresponding C # client program that sends messages to this socket from the same PC. They both work great.

Now, if I run the client and server programs on a separate PC and connect them through the cable connecting their serial ports (RS232), should I make changes to the code to make them work? I ask, since I do not have 2 PCs to test, but I need it to work during deployment.

Thanks.

+3
source share
4 answers

, , - .

SerialPort. .

, - , .

+7

127.0.0.1, , 0.0.0.0

, IP-, IP-. 127.0.0.1 IP- , ( , loopback). 0.0.0.0 " IP-", , .

... , , , , .

+1

, : -)

TCP/IP ethernet - , RS232, .

, .

0

TCP / IP also works on SLIP. Remember the old way you used to connect to the Internet? PPP will also work. But I do not think that this is what he is looking for.

0
source

Source: https://habr.com/ru/post/1710455/


All Articles