How does --read-from-tcp-port=PORT work?

19 views
Skip to first unread message

guest271314

unread,
Jul 20, 2024, 10:17:38 AM (4 days ago) Jul 20
to v8-users
How does --read-from-tcp-port=PORT work? 

Does d8 read from TCP port as stdin with readline()?

Is the read from TCP port executed by d8?

Leszek Swirski

unread,
Jul 22, 2024, 2:06:47 AM (3 days ago) Jul 22
to v8-users
--read-from-tcp-port=PORT is a little hack to allow d8 running on a remote device (in particular, on an Android phone) to read files from an external server (in particular, an attached workstation). I added this to help us run tests on an Android device without needing to push all the relevant JS files to the device, by instead doing some port forwarding (see tools/adb-d8.py); it's not for reading stdin.

guest271314

unread,
1:10 AM (20 hours ago) 1:10 AM
to v8-u...@googlegroups.com
Thanks. How does it work though?

The only example I found was a Python script. I didn't see a way to use the capability in d8.


--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to a topic in the Google Groups "v8-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/v8-users/gaKe0NzA0Dc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to v8-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/6225de0a-cca2-434b-8a5b-3891b66e9266n%40googlegroups.com.

Leszek Swirski

unread,
4:36 AM (16 hours ago) 4:36 AM
to v8-u...@googlegroups.com
When d8 reads a file, if the flag is set then the file read is hijacked and redirected to the tcp port (here: https://source.chromium.org/chromium/chromium/src/+/main:v8/src/d8/d8.cc;l=4290;drc=d5d65f04079b486bfbe0fa272cdaf242525af74b). There's no other way to use this from d8, or for JS code in d8 to access this port.

Reply all
Reply to author
Forward
0 new messages