mirror of
https://github.com/janet-lang/janet
synced 2025-11-15 14:57:22 +00:00
Add methods to streams.
This makes streams polymorphic with files in many cases. printf family functions still need porting.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
(def conn (net/connect "127.0.0.1" "8000"))
|
||||
(printf "Connected to %q!" conn)
|
||||
(net/write conn "Echo...")
|
||||
(print "Wrote to connection...")
|
||||
(def res (net/read conn 1024))
|
||||
(pp res)
|
||||
(net/close conn)
|
||||
(with [conn (net/connect "127.0.0.1" "8000")]
|
||||
(printf "Connected to %q!" conn)
|
||||
(:write conn "Echo...")
|
||||
(print "Wrote to connection...")
|
||||
(def res (:read conn 1024))
|
||||
(pp res))
|
||||
|
||||
Reference in New Issue
Block a user