mirror of
https://github.com/janet-lang/janet
synced 2025-10-14 23:37:40 +00:00
Get windows IOCP working for accept.
This also changes the api of servers slightly - in light of having support for ev tasks, it is probably better to remove the "simple" server code and replace it with some Janet or remove it all together. While convenient, it has issues with error handling and rigidity.
This commit is contained in:
5
examples/echoclient.janet
Normal file
5
examples/echoclient.janet
Normal file
@@ -0,0 +1,5 @@
|
||||
(with [conn (net/connect "127.0.0.1" 8000)]
|
||||
(print "writing abcdefg...")
|
||||
(:write conn "abcdefg")
|
||||
(print "reading...")
|
||||
(printf "got: %v" (:read conn 1024)))
|
@@ -9,6 +9,7 @@
|
||||
(printf " %v -> %v" id b)
|
||||
(:write stream b)
|
||||
(buffer/clear b))
|
||||
(printf "Done %v!" id)))
|
||||
(printf "Done %v!" id)
|
||||
(ev/sleep 0.5)))
|
||||
|
||||
(net/server "127.0.0.1" "8000" handler)
|
||||
|
Reference in New Issue
Block a user