Skip to content

Example script in swoole github is broken. How can the proxy server script be updated? #5178

Open
@AlwaysCompile

Description

@AlwaysCompile

Please answer these questions before submitting your issue.

  1. What did you do? If possible, provide a simple script for reproducing the error.

The example script is broken: https://github.com/swoole/proxy-server/blob/master/tcp-proxy.php

  1. What did you expect to see?

The working script

  1. What did you see instead?

It is broken because swoole no longer supports callbacks for clients? The "on()" method cannot be found. Swoole also does not seem to provide a way to pipe data and events between sockets, so there is not a way to get data and relay it back to the client as a proxy server should do.

How can the example script be made working again with the new coroutine system?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions