Git Product home page Git Product logo

Comments (7)

GrahamCampbell avatar GrahamCampbell commented on July 16, 2024 1

Is this basically what you had in mind as the only change?

image

from chrome.

GrahamCampbell avatar GrahamCampbell commented on July 16, 2024 1

OK, I can make the change then. I just didn't want to be treading on toes. ;)

from chrome.

divinity76 avatar divinity76 commented on July 16, 2024

For this to be fixed, \Wrench\Client needs a getSocketResource() method.

Made a PR: chrome-php/wrench#17

Before more progress can be made, it seems we need to wait for the method/PR to be accepted, and wait for a new chrome-php/wrench version to be released 🤔

Here is my investigation notes so far:
class \HeadlessChromium\Communication\Connection has a protected \HeadlessChromium\Communication\Socket\SocketInterface $wsClient;

\HeadlessChromium\Communication\Socket\SocketInterface has no getSocketResource().

\HeadlessChromium\Communication\Socket\Wrench must then create its own getSocketResource(),
returning the resource from protected \Wrench\Client $client;
\Wrench\Client needs a getSocketResource(), returning it's socket resource from protected \Wrench\Socket\ClientSocket $socket;

\Wrench\Socket\ClientSocket inherits $this->socket property from UriSocket...

\Wrench\Socket\UriSocket inherits $this->socket property from \Wrench\Socket\AbstractSocket...

\Wrench\Socket\AbstractSocket has a public function getResource()

that means UriSocket has it too... that means ClientSocket also has it.. \Wrench\Client needs to expose it publicly (or at least protectedly)
it needs a
public function getSocketResource(){return $this->socket->getResource();}

from chrome.

divinity76 avatar divinity76 commented on July 16, 2024

update: The upcoming Wrench 1.7 will have a new \Wrench\Client::waitForData method which uses select() internally, we should replace \usleep($timeToWait * 1000); with $this->wsClient->waitForData($timeToWait); once Wrench >=1.7 is available.

from chrome.

GrahamCampbell avatar GrahamCampbell commented on July 16, 2024

@divinity76 Are you planning on picking up the next step of this, with a PR to this repo?

from chrome.

divinity76 avatar divinity76 commented on July 16, 2024

@GrahamCampbell no, I've since lost interest, I made some workaround for my specific problem and moved on.

But yes that's exactly what I had in mind!

from chrome.

divinity76 avatar divinity76 commented on July 16, 2024

@GrahamCampbell perfect, thanks

from chrome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.