Comments (7)
Is this basically what you had in mind as the only change?
from chrome.
OK, I can make the change then. I just didn't want to be treading on toes. ;)
from chrome.
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.
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.
@divinity76 Are you planning on picking up the next step of this, with a PR to this repo?
from chrome.
@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.
@GrahamCampbell perfect, thanks
from chrome.
Related Issues (20)
- waitUntilContainsElement with logical operator? HOT 2
- Persistent Browser Connection Issue: Stalling at chrome-php/Browser.php:84
- How to give margin from top in 2nd and next pages (not 1st page)
- [BUG] Chrome process stopped before startup completed. HOT 8
- [Bug]: PageLayoutMetrics::getResultData(): Return value must be of type array, null returned HOT 2
- command not (always?) available in shell_exec HOT 1
- How to get Request Headers? HOT 1
- Print on MacOs using php local server: timeout HOT 2
- PHP is not a snap cgroup (Chromium) HOT 4
- It tells "<noscript>You need to allow this site to execute JavaScript</noscript>" HOT 8
- How to disable userDataDir and userCrashDumpsDir ? HOT 1
- Cannot print CSS style "background" HOT 1
- How to get the asynchronous response result of the specified URL? HOT 1
- Redirects and difference between headless on and off HOT 4
- Timeout for loading dynamic content HOT 6
- Page->addPreScript doesn't return identifier
- Connect with external Headless Chrome container HOT 4
- getting the initial page would be nice HOT 2
- Get current request headers HOT 1
- Using a proxy with authorization HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chrome.