3 releases (breaking)
|0.3.0||Jun 14, 2019|
|0.2.0||Jun 13, 2019|
|0.1.0||Jun 11, 2019|
What is lancat?
lancat is a tool that extends the behaviour of
cat linux utility to the LAN.
It sends a multicast message for searching lancat listeners in the LAN,
then creates one-to-one tcp connection for each listener found in order to transfer the information
in a reliable way and without saturating the network.
$ cargo install lancat
If you have
~/.cargo/bin in your PATH, you will be able to use lancat everywhere in your computer!
windows, but can be works in others platforms.
How it works?
It has two main modes: write to the LAN, and read from the LAN.
To the LAN
To write data to the LAN, run
lancat into write mode with
$ lancat -w hello lan
Furthermore, you can redirect the standard input from a file to write it into the LAN:
$ lancat -w < to_share.txt
From the LAN
To read data from the LAN, run
lancat into read mode with
$ lancat -r =========== username - 192.168.1.35:43230 =========== hello lan
In the case you want to send the incoming data to a certain file, you can redirect the standard output:
$ lancat -r -q > shared.txt
-q flag (also
--quiet) will avoid to write the user name line into the file.
By default lancat notifies to the LAN with your OS user name.
It is possbile to change this name with the
You can filter for writing or reading only for certain users:
$ lancat -w -u user1 user2
$ lancat -r -u user1 user2
In order to see which users are listening the lan, you can run lancat in search mode with
$ lancat -s Found 'user1' at: 192.168.1.72:44435 Found 'user2' at: 192.168.1.72:44439 Found 'user3' at: 192.168.1.54:44432
To see all available options see the help:
Pair to pair LAN communication
Default user names
Sending a message filtering by user1:
$ echo "Hello user1" | lancat -w -u user1
Receiving messages filtering by user2:
$ lancat -r -q -u user2 Hello user1
Only users with names user1 and user2 will be able participate in the communication.
Sending a message to Juanito identifying us as Pepito:
$ echo "Hello Juanito, I'm Pepito" | lancat -w -n Pepito -u Juanito
Receiving messages intended for Juanito that only Pepito sends:
$ lancat -r -q -n Juanito -u Pepito Hello Juanito, I'm Pepito
- Windows support.
- Listen callback is also called when port and ip changes (not only the user name).
- Modified cli
- lancat base