[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [websocket/master] Make client example loop over MethodNames.
commit f55fcc3110b1a1491bec1f76ae0f61d4873017b9
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date: Sun Nov 3 17:45:46 2013 -0800
Make client example loop over MethodNames.
---
src/pt/pt.go | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/pt/pt.go b/src/pt/pt.go
index 9ff9437..526f3b7 100644
--- a/src/pt/pt.go
+++ b/src/pt/pt.go
@@ -3,12 +3,16 @@
// Sample client usage:
//
// import "git.torproject.org/pluggable-transports/websocket.git/src/pt"
-// pt.ClientSetup([]string{"foo"})
-// ln, err := startSocksListener()
-// if err != nil {
-// panic(err.Error())
+// var ptInfo pt.ClientInfo
+// ptInfo = pt.ClientSetup([]string{"foo"})
+// for _, methodName := range ptInfo.MethodNames {
+// ln, err := startSocksListener()
+// if err != nil {
+// pt.CmethodError(methodName, err.Error())
+// continue
+// }
+// pt.Cmethod(methodName, "socks4", ln.Addr())
// }
-// pt.Cmethod("foo", "socks4", ln.Addr())
// pt.CmethodsDone()
//
// Sample server usage:
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits