[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [flashproxy/master] Update pt.go server example.
commit e5b1e1965431ec5bb75b2cfbabf7b834d1bccc49
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date: Sat Feb 2 20:29:39 2013 -0800
Update pt.go server example.
---
websocket-transport/pt.go | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/websocket-transport/pt.go b/websocket-transport/pt.go
index f39e177..61ec456 100644
--- a/websocket-transport/pt.go
+++ b/websocket-transport/pt.go
@@ -12,15 +12,23 @@
//
// Sample server usage:
//
-// info := PtServerSetup([]string{"foo", "bar"})
+// var ptInfo PtServerInfo
+// info = PtServerSetup([]string{"foo", "bar"})
// for _, bindAddr := range info.BindAddrs {
// ln, err := startListener(bindAddr.Addr)
// if err != nil {
-// panic(err.Error())
+// PtSmethodError(bindAddr.MethodName, err.Error())
// }
// PtSmethod(bindAddr.MethodName, ln.Addr())
// }
// PtSmethodsDone()
+// func handler(conn net.Conn) {
+// or, err := PtConnectOr(&ptInfo, ws.Conn)
+// if err != nil {
+// return
+// }
+// // Do something with or and conn.
+// }
package main
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits