1

This one is similar to Sending messages to another user except that I want to accept messages over network.

If there is a way to just unblock the port to receive messages, that would be fine. If there is a service that needs to be installed - that is also fine. I want to use IP or hash on DHT to find the user.

It would be nice to use some service/method that is like ubiquitous and simple.

anatoly techtonik
  • 2,514
  • 4
  • 24
  • 37

1 Answers1

2

You can use nc (netcat):

At first use nc to open a port on first computer that the second computer will connect to:

$ nc -l 5000

Here we have opened port 5000 for incoming connection. Now connect to the port 5000 of the first computer from the second one:

$ nc 192.168.1.5 5000

192.168.1.5 is the IP of the first computer.

Now the connection will be established and the computers can communicate with each other.

heemayl
  • 54,820
  • 8
  • 124
  • 141
  • That's requires me to know the port. Is there some port that exists exactly for that? – anatoly techtonik Mar 19 '15 at 09:37
  • @techtonik: None that i am aware of..the port is being deliberately open for incoming connections, it can be any port other than the well known ports....you need to know the listening port to connect to that.. – heemayl Mar 19 '15 at 09:59