Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

Websocket Support for IPC #28

Open
pushkar-g opened this issue Sep 15, 2014 · 2 comments
Open

Websocket Support for IPC #28

pushkar-g opened this issue Sep 15, 2014 · 2 comments
Labels
Milestone

Comments

@pushkar-g
Copy link

Hi,
Currently PhantomJS supports IPC using Websocket client.

Can TriffleJS also add support for WebSocket client in TriffleJS context? I would be more than happy to submit a PR if that makes sense.

@sdesalas
Copy link
Owner

Hi Pushkar,

TrifleJS uses the underlying IE engine so Websockets will only supported in IE10 and above. Its not something that I can add or remove myself.

http://caniuse.com/#feat=websockets

Regards,
Steven

@sdesalas
Copy link
Owner

While on the topic of IPC (Inter Process Communication):

Your options currently are (in my personal order of preference):

.1. Running a WebServer listener to consume data (or scripts) sent by another process then replying via POST message using WebPage.open() (HTTP JSON IPC)
.2. Executing files generated by another process in V8 context using phantom.injectJs(filename) then generating responses by writing to other files in response. (Filesystem IPC).

I'll also be implementing the child_process API in Phantom (at some point). This will add:

.3. Calling TrifleJS on command line, then using child_process API to call other executables (Batch IPC).

Steven

PS. WebSockets sounds like a convoluted way to implement IPC... or maybe I'm missing something? While on the consumer side it appears easy, the implementation itself is not simple. If its worth it I might attempt but there are a lot of things that are higher priority right now, like implementing PhantomJS API.

@sdesalas sdesalas added this to the Nice to Have milestone Nov 30, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants