Skip to content

Commit

Permalink
Hook up the new TCP server as the default for 'wp run'.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy C committed May 23, 2014
1 parent 1468f28 commit 3a48db8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions wp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ serve() {
$THIS_DIR/webpipe/serve.py "$@"
}

# Better/more portable server than nc. Should only be used when we don't care
# about running on Mac.
socat-listen() {
local port=$1
# -u: unidirection (</dev/null would be the same)
Expand Down Expand Up @@ -163,8 +165,7 @@ run() {
#
# We might want recv --listen-port too, but maybe later. And even server
# --listen-port.
socat-listen 8988 \
| xrender $INPUT_DIR $session \
xrender -p 8988 $INPUT_DIR $session \
| serve serve $session
}

Expand Down Expand Up @@ -282,6 +283,8 @@ recv() {

# TODO: This should be documented. This is in conjunction with wp ssh, and
# remove wp-stub.sh send, I think.
# NOTE: We're using socat here because this is for Linux people? Could also
# add recv -p (factor the code out of xrender and put it in util/common).
run-recv() {
socat-listen 8987 \
| recv ~/webpipe/input \
Expand Down

0 comments on commit 3a48db8

Please sign in to comment.