Download the PHP package php-opcua/opcua-client-ext-reverse-connect without Composer

On this page you can find all versions of the php package php-opcua/opcua-client-ext-reverse-connect. 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 opcua-client-ext-reverse-connect

OPC UA Reverse Connect — PHP listener

Tests Coverage Latest Version PHP Version

Linux macOS Windows


Client-side listener for OPC UA Reverse Connect (Part 6 §7.1.2.3). Extension of php-opcua/opcua-client. The server dials out, the client accepts; everything after the opening ReverseHello frame is the standard UA-TCP protocol.

Reverse Connect inverts who initiates the underlying TCP connection. It is the pattern of choice when the server is behind NAT or a one-way firewall: the device dials outward, your PHP application listens for the incoming socket, validates the announced ServerUri, then proceeds with the normal UA-TCP handshake — secure channel, session, service calls — exactly as if you had connected the regular way.

What you can do with it:

Pure PHP, no native extensions, no event loop dependency.

Note: This package only ships the listener-side machinery. The OPC UA server you talk to must support Reverse Connect on its end and be told (via configuration, MQTT, an HTTPS callback — whatever fits your topology) to dial back to the listener's host and port. For integration testing the uanetstandard-test-suite v1.4.0+ exposes two Method nodes — StartReverseConnect and StopReverseConnect — that let a regular client trigger the outbound dial.

### How it relates to `opcua-client` The only seam in the core package is the `TcpTransport::fromConnectedSocket()` factory (added in v4.4.0) and the matching `ManagesConnectionTrait::performConnect()` skip when the transport is already connected. Everything else — the listener, the parser, the whitelist validator, the bridge to `ClientBuilder` — lives here. Applications that do not need Reverse Connect take no extra dependency.

Quick Start

That's it. Bind, accept, build, use, disconnect — five calls and you are reading values through a socket the server opened.

See It in Action

Validate against a whitelist

An empty whitelist refuses every incoming frame — the validator is fail-secure by default.

React to events (PSR-14)

Zero overhead when no dispatcher is provided — events are not constructed at all.

Trigger the server from PHP (test suite flow)

In production the trigger is whatever you already have — HTTPS callback, MQTT push, a CLI on the gateway. The listener does not care how the server learned where to dial.

Connect with full security

Reverse Connect inverts the TCP direction; it does not change the OPC UA security model. Configure the builder inside the $configure closure the same way you would for a classic outbound client. Do not call setTransport() inside the closure — the factory has already wired one from the inherited socket.

Run the loop

Why This Package?

Documentation

The published version of the documentation lives at https://www.php-opcua.com/dev/components. The Markdown sources ship under docs/:

Section Covers
Getting started — Quick start What it is, how to install, first listener
Concepts — How Reverse Connect works Wire format, lifecycle, security model
API — Events Constructor arguments, methods, rejection rules
Recipes — Docker host networking extra_hosts + 0.0.0.0 bind pattern
Reference — Exceptions Every exception, cause, and catch strategy

Testing

The integration suite expects the opcua-no-security service from uanetstandard-test-suite running on opc.tcp://localhost:4840 with extra_hosts: ["host.docker.internal:host-gateway"] configured (already the case in v1.4.0+).

Ecosystem

Package Description
opcua-client Pure PHP OPC UA client (the core this extension hooks into)
opcua-client-ext-pubsub OPC UA PubSub Subscriber — UDP + UADP + JSON
opcua-cli CLI tool — browse, read, write, watch, discover endpoints, manage certificates
opcua-client-nodeset Pre-generated PHP types from 51 OPC Foundation companion specifications
laravel-opcua Laravel integration — service provider, facade, config
uanetstandard-test-suite Docker-based OPC UA test servers (UA-.NETStandard) for integration testing

Community

Have questions, ideas, or want to share what you've built? Join the GitHub Discussions.

Contributing

Contributions welcome — see CONTRIBUTING.md in the core repository for the shared code style and workflow.

Changelog

See CHANGELOG.md.

License

MIT


All versions of opcua-client-ext-reverse-connect with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
php-opcua/opcua-client Version ^4.4
psr/log Version ^3.0
psr/event-dispatcher Version ^1.0
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 php-opcua/opcua-client-ext-reverse-connect contains the following files

Loading the files please wait ...