[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [goptlib/master] Add SmethodArgs to emit SMETHOD with ARGS.
commit af41f2c1074ad73bde5b326083d2511b30924793
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date: Sun Dec 8 03:03:12 2013 -0800
Add SmethodArgs to emit SMETHOD with ARGS.
---
pt.go | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/pt.go b/pt.go
index 18c3b73..4f7f167 100644
--- a/pt.go
+++ b/pt.go
@@ -259,6 +259,12 @@ func Smethod(name string, addr net.Addr) {
line("SMETHOD", name, addr.String())
}
+// Emit an SMETHOD line with an ARGS option. args is a nameâ??value mapping that
+// will be added to the server's extrainfo document.
+func SmethodArgs(name string, addr net.Addr, args Args) {
+ line("SMETHOD", name, addr.String(), "ARGS:"+encodeSmethodArgs(args))
+}
+
// Emit an SMETHODS DONE line. Call this after opening all server listeners.
func SmethodsDone() {
line("SMETHODS", "DONE")
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits