Download the PHP package zero-to-prod/stream-socket-cli without Composer
On this page you can find all versions of the php package zero-to-prod/stream-socket-cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zero-to-prod/stream-socket-cli
More information about zero-to-prod/stream-socket-cli
Files in zero-to-prod/stream-socket-cli
Package stream-socket-cli
Short Description A CLI for a stream socket.
License MIT
Homepage https://github.com/zero-to-prod/stream-socket-cli
Informations about the package stream-socket-cli
Zerotoprod\StreamSocketCli
Contents
- Introduction
- Requirements
- Installation
- Documentation Publishing
- Automatic Documentation Publishing
- Usage
- Available Commands
stream-socket-cli:srcstream-socket-cli:remote-socket-namestream-socket-cli:local-socket-namestream-socket-cli:send-tostream-socket-cli:supports-lockstream-socket-cli:get-options
- Available Commands
- Docker Image
- Local Development
- Image Development
- Contributing
Introduction
A CLI for a stream socket.
Requirements
- PHP 8.1 or higher.
Installation
Install Zerotoprod\StreamSocketCli via Composer:
This will add the package to your project's dependencies and create an autoloader entry for it.
Documentation Publishing
You can publish this README to your local documentation directory.
This can be useful for providing documentation for AI agents.
This can be done using the included script:
Automatic Documentation Publishing
You can automatically publish documentation by adding the following to your composer.json:
Usage
Run this command to see the available commands:
Available Commands
stream-socket-cli:src
Displays the project's GitHub repository URL.
Usage:
Example:
Output:
stream-socket-cli:remote-socket-name
Returns the remote socket name for a given URL connection.
Usage:
Arguments:
url(required): The URL to connect to
Example:
Output:
stream-socket-cli:local-socket-name
Returns the local socket name for a given URL connection.
Usage:
Arguments:
url(required): The URL to connect to
Example:
Output:
stream-socket-cli:send-to
Sends a message to a socket, whether it is connected or not.
Usage:
Arguments:
url(required): The URL to connect todata(required): The data to be sent
Options:
--flags: The value of flags can be any combination of the following: STREAM_OO--address: The address specified when the socket stream was created will be used unless an alternate address is specified in address. If specified, it must be in dotted quad (or [ipv6]) format
Example:
Output:
stream-socket-cli:supports-lock
Tells whether the stream supports locking. Returns the URL for true, otherwise returns an empty string.
Usage:
Arguments:
url(required): The URL to connect to
Example:
Output (if supports locking):
Output (if doesn't support locking):
stream-socket-cli:get-options
Retrieve options for a stream/wrapper/context.
Usage:
Arguments:
url(required): The URL to connect to
Example:
Output:
Docker Image
You can also run the cli using the docker image:
Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page if you want to contribute.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Commit changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature-branch). - Create a new Pull Request.
All versions of stream-socket-cli with dependencies
ext-json Version *
symfony/console Version ^7.2
zero-to-prod/stream-socket Version ^81.0
zero-to-prod/package-helper Version ^1.1.3
zero-to-prod/data-model Version ^81.13