Download the PHP package yggverse/nps without Composer

On this page you can find all versions of the php package yggverse/nps. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nps

Archived!

Use Ratchet IoServer - asynchronous WebSocket in PHP as more featured replacement to this library.

nps-php

PHP 8 / Composer Library for NPS Protocol

Like Titan for Gemini, NPS is the satellite for NEX protocol (see also nex-php)\ it listen for single dot in line to signal the package ending.

Specification

nex://nightfall.city/nps/

Usage

Server

Build interactive server instance to listen NPS protocol connections!

Provide optional host, port, size, line and live arguments in constructor:

Alternatively, use following setters after object initiation

Server::setHost

Bind server host to listen incoming connections, 127.0.0.1 by default

Server::getHost

Get current server host

Server::setPort

Bind server port to listen incoming connections, 1915 by default

Server::getPort

Get current server port

Server::setSize

Set total content length limit by mb_strlen, 0 by default (unlimited)

Server::getSize

Get current content length limit

Server::setLine

Set packet line limit in bytes passing to fread, 1024 by default

Server::getLine

Get current packet line limit

Server::setLive

Set server status true|false to shutdown immediately

Server::getLive

Get current server status

Server::setWelcome

Define application logic on peer connection established

Server::getWelcome

Get current Welcome function, null by default

Server::setPending

Define application logic on peer make initial request

Server::getPending

Get current Pending function, null by default

Server::setHandler

Define basic application logic on complete packet received

Server::getHandler

Get current Handler function, null by default

Server::start

Run server object

Optionally, define handler function as the argument to process application logic dependent of client request

Server::stop

Stop server instance.

Same to Server::setLive(false)

Testing

  1. nc 127.0.0.1 1915 - connect server using nc
  2. test - enter the target path
  3. YOUR MESSAGE GOES HERE - enter the message text
  4. . - commit package with dot

To send any file:

cat file.txt | nc 127.0.0.1 1915


All versions of nps with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yggverse/nps contains the following files

Loading the files please wait ....