diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/world/net/udp.jvm.lux | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/stdlib/source/lux/world/net/udp.jvm.lux b/stdlib/source/lux/world/net/udp.jvm.lux index 27363956d..09726c5ae 100644 --- a/stdlib/source/lux/world/net/udp.jvm.lux +++ b/stdlib/source/lux/world/net/udp.jvm.lux @@ -73,7 +73,7 @@ (`` (for {(~~ (static host.jvm)) (as-is (def: (resolve address) (-> //.Address (IO (Error InetAddress))) - (do (error.with-error io.monad) + (do (error.with io.monad) [addresses (InetAddress::getAllByName address)] (: (IO (Error InetAddress)) (case (array.size addresses) @@ -86,7 +86,7 @@ (structure (def: (read size) (let [data (binary.create size) packet (DatagramPacket::new|receive data +0 (.int size))] - (do (error.with-error io.monad) + (do (error.with io.monad) [_ (DatagramSocket::receive packet socket) #let [bytes-read (.nat (DatagramPacket::getLength packet))]] (wrap [bytes-read @@ -95,7 +95,7 @@ data])))) (def: (write [location data]) - (do (error.with-error io.monad) + (do (error.with io.monad) [address (resolve (get@ #//.address location))] (DatagramSocket::send (DatagramPacket::new|send data +0 (.int (binary.size data)) address (.int (get@ #//.port location))) socket))) @@ -106,11 +106,11 @@ (def: #export client (IO (Error (UDP IO))) (|> (DatagramSocket::new|client) - (:: (error.with-error io.monad) map udp))) + (:: (error.with io.monad) map udp))) (def: #export server (-> //.Port (IO (Error (UDP IO)))) (|>> .int DatagramSocket::new|server - (:: (error.with-error io.monad) map udp))) + (:: (error.with io.monad) map udp))) )})) |