makefiles/ws.mk

11 lines
343 B
Makefile

WS_PORT ?= 8080
WS_SERVICE ?= 127.0.0.1:$(WS_PORT)
WS_TARGET_SERVICE ?= pong
WS_TARGET ?= unix:/tmp/.libipc-run/$(WS_TARGET_SERVICE)
init-websocket-tcpd:
@# '-b' binary, '-E' quit on end-of-file, 'ws-l' websocket URI to listen
@# each connection is redirected to last parameter
websocat -b -E ws-l:$(WS_SERVICE) $(WS_TARGET)