3 This example connects a websocket connection to stdin and stdout of a command.
4 Received messages are written to stdin followed by a `\n`. Each line read from
5 standard out is sent as a message to the client.
7 $ go get github.com/gorilla/websocket
8 $ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/command`
9 $ go run main.go <command and arguments to run>
10 # Open http://localhost:8080/ .
12 Try the following commands.
14 # Echo sent messages to the output area.
17 # Run a shell.Try sending "ls" and "cat main.go".