{"repo":"leozz37/hare","free":true,"listed":false,"github":"https://github.com/leozz37/hare","clone":"git clone https://github.com/leozz37/hare.git","description":"🐇 CLI tool for websockets and Go package","language":"Go","stars":55,"topics":["sockets","golang","go","network","socketio","messaging","hare"],"license":"MIT","category":"chat-messaging","readme_excerpt":"Hare Sockets 🐇 Hare is an user-friendly package for sockets in Golang and a CLI tool for sockets interaction. You can send and listen to TCP connections with a few lines of code or commands. Contents - Installation - Quickstart - Documentation - Examples - Testing - Contributing - License 🖥️ Installation Installation guide for the CLI Tool and Golang Library. 💻 CLI Tool To install the CLI tool, you can install it through Homebrew: Or you can install manually with the Makefile script: 🐇 Golang Lib First, you need Go (version 1.12+ is required), then you can install Hare: Import it in your code: 🍕 Quickstart Quick start for the CLI Tool and the Golang Library. 💻 CLI Tool To use the CLI tool, these are the flags: You can run the --help flag: To Listen to port 3000 for example, run: To Send a payload with the message Hello World to port 3000 for example, run: 🐇 Golang Lib Sample code for sending payloads: Sample code for listening a port: 📖 Documentation The library consists of two features: listen and send to a given port. You can check the full documentation on Godoc. Send Receives a port and a message , both as string and returns an error (if something goes wrong). Usage example: --- Listen Receives a port as string and returns a Listener struct and an error (if something goes wrong). Usage example: --- Listener The Listener struct returned by Listen() function has the following fields: SocketListener is the socket connection. HasNewMessages() function returns a bool b","default_branch":null,"files":null,"tree":[],"storefront":"/r/leozz37","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/leozz37/hare/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}