[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [meek/master] Rename some functions to reflect that they deal with SOCKS connections.
commit 54d3b7f2500cc1da06ada2253baf19c7005e4774
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date: Mon Dec 2 16:58:34 2019 -0700
Rename some functions to reflect that they deal with SOCKS connections.
---
meek-client/meek-client.go | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/meek-client/meek-client.go b/meek-client/meek-client.go
index d76ca98..18bbff1 100644
--- a/meek-client/meek-client.go
+++ b/meek-client/meek-client.go
@@ -273,7 +273,7 @@ func genSessionID() string {
}
// Callback for new SOCKS requests.
-func handler(conn *pt.SocksConn) error {
+func handleSOCKS(conn *pt.SocksConn) error {
defer conn.Close()
err := conn.Grant(&net.TCPAddr{IP: net.IPv4zero, Port: 0})
if err != nil {
@@ -336,7 +336,7 @@ func handler(conn *pt.SocksConn) error {
return copyLoop(conn, &info)
}
-func acceptLoop(ln *pt.SocksListener) error {
+func acceptSOCKS(ln *pt.SocksListener) error {
defer ln.Close()
for {
conn, err := ln.AcceptSocks()
@@ -348,7 +348,7 @@ func acceptLoop(ln *pt.SocksListener) error {
return err
}
go func() {
- err := handler(conn)
+ err := handleSOCKS(conn)
if err != nil {
log.Printf("error in handling request: %s", err)
}
@@ -484,7 +484,7 @@ func main() {
pt.CmethodError(methodName, err.Error())
break
}
- go acceptLoop(ln)
+ go acceptSOCKS(ln)
pt.Cmethod(methodName, ln.Version(), ln.Addr())
log.Printf("listening on %s", ln.Addr())
listeners = append(listeners, ln)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits