blob: e20d7c9a87c22a3b88b4a9d1be7b4ad2b368b07e [file] [log] [blame]
// +build OMIT
package main
import (
"code.google.com/p/go.net/websocket"
"fmt"
"net/http"
)
func main() {
http.Handle("/", websocket.Handler(handler))
http.ListenAndServe("localhost:4000", nil)
}
func handler(c *websocket.Conn) {
var s string
fmt.Fscan(c, &s)
fmt.Println("Received:", s)
fmt.Fprint(c, "How do you do?")
}