How to do simple chat in Linux with TCP-IP ?
- netcat
- telnet
Steps :
- Initiate netcat in a logical Port of Machine A
nc -l 10000
Here 10000 is a logical Port. You can assign 2 ^ 16 Ports. But some are default ports already. This means the service started over network on the port. A normal man nc briefs about it.
- Now Connect using Telnet from the Machine B (or) local machine (Machine A):
- From another Machine like said (Machine B)
#telnet ip 10000
telnet localhost 10000
A simple TCP/IP Session has been implemented in a logical port and can read/write (Means Normal chat :)).
Related Posts
Understand Basic Sql Joins From Examples
Network Visualization By R Shiny With Igraph D3 And Visnetwork