Skip to content

Commit 7ccb4bb

Browse files
committed
Fix documentation for with-local-port-forward
1 parent c2ba87d commit 7ccb4bb

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,13 @@ time.
5454

5555
SSH tunneling is also supported:
5656

57+
```clj
5758
(with-ssh-agent []
5859
(let [session (session "localhost" :strict-host-key-checking :no)]
59-
(with-local-tunnel session 8080 80
60-
(with-connection session
61-
(while (connected? session)
62-
(Thread/sleep 100))))))
63-
64-
or more conveniently:
65-
66-
(with-ssh-agent []
67-
(let [session (session "localhost" :strict-host-key-checking :no)]
68-
(ssh-tunnel session 8080 80)))
60+
(with-connection session
61+
(with-local-port-forward [session 8080 80]
62+
(comment do something with port 8080 here)))))
63+
```
6964

7065
## Documentation
7166

0 commit comments

Comments
 (0)