blob: fa0efd3dce3b748becff34158d3f6bbe425d1dfd [file] [log] [blame]
// +build ignore,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?")
}