The Multicast Communication Tool is a Go application that allows users to send and receive multicast messages over a network. It provides a simple command-line interface for selecting network interfaces and configuring multicast settings.
- List available network interfaces
- Send multicast messages
- Receive multicast messages
- Handle user input for interface selection and multicast configuration
- Graceful recovery from panics
- A network interface that supports multicast
- For building from source: Go 1.21 or later
You can download the pre-built binaries for your operating system from the Releases page:
- Windows: Download
multicast-tool-windows-amd64.zip
- macOS: Download
multicast-tool-darwin-amd64.tar.gz
- Linux: Download
multicast-tool-linux-amd64.tar.gz
After downloading, extract the archive and run the executable.
When running the application on macOS, you might encounter security warnings because the binary isn't signed with an Apple developer certificate. To run the application:
- After downloading and extracting the
.tar.gz
file, try to run the application. - If you see a security warning saying the app "cannot be opened because it is from an unidentified developer":
- Right-click (or Control-click) on the application
- Select "Open" from the context menu
- Click "Open" in the security dialog that appears
- The application will now run, and macOS will remember your choice for future launches
Alternatively, you can:
- Go to System Preferences > Security & Privacy > General
- Look for the message about the blocked application
- Click "Open Anyway" to allow the application to run
These steps are only needed the first time you run the application.
-
Clone the repository:
git clone https://github.com/yourusername/multicast-communication-tool.git cd multicast-communication-tool
-
Build the application:
go build -o multicast-tool main.go
-
Run the application:
# On Linux/macOS ./multicast-tool # On Windows multicast-tool.exe
-
Select a Network Interface: The application will prompt you to select a network interface from the list of available interfaces on your machine.
-
Choose an Operation: After selecting an interface, you can choose to either send or receive multicast messages:
- 1: Multicast Sender (Will initiate multicast data)
- 2: Multicast Receiver (Will receive multicast data)
- 3: Exit
-
Configure Multicast Settings: If you choose to send or receive messages, you will be prompted to enter:
- Multicast address (between
224.0.0.0
to239.255.255.255
) - Port number (between
1
and6445
)
- Multicast address (between
-
Sending Messages: If you select the sender option, the application will continuously send a test message to the specified multicast address.
-
Receiving Messages: If you select the receiver option, the application will listen for incoming multicast messages and print them to the console.
Select any of the following interfaces---------------
1 192.168.1.10 eth0
2 192.168.1.11 wlan0
3 EXIT
Please select an option: 1
----Select from the following options-----
1. Multicast Sender(Will initiate multicast data)
2. Multicast Receiver(Will receive Multicast Data)
3. Exit
The application includes basic error handling for common issues, such as invalid multicast addresses and network errors. If an error occurs, the application will provide feedback and prompt the user to try again.
Contributions are welcome! If you have suggestions for improvements or new features, please open an issue or submit a pull request.
To build the application for different platforms, you can use the following commands:
# For Windows
GOOS=windows GOARCH=amd64 go build -o multicast-tool.exe main.go
# For macOS
GOOS=darwin GOARCH=amd64 go build -o multicast-tool main.go
# For Linux
GOOS=linux GOARCH=amd64 go build -o multicast-tool main.go
This project is licensed under the MIT License. See the LICENSE file for details.
- Thanks to the Go community for their support and resources.