@@ -17,9 +17,8 @@ def read(handle: Connection, buffer: ByteArray, offset: Int, size: Int): Int / E
17
17
def write(handle: Connection, buffer: ByteArray, offset: Int, size: Int): Int / Exception[IOError] =
18
18
internal::checkResult(internal::write(handle, buffer, offset, size))
19
19
20
- def close(handle: Connection): Unit / Exception[IOError] = {
21
- internal::checkResult(internal::close(handle)); ()
22
- }
20
+ def close(handle: Connection): Unit =
21
+ internal::close(handle)
23
22
24
23
/// A tcp listener. Should not be inspected.
25
24
type Listener = Int
@@ -31,9 +30,8 @@ def listen(listener: Listener, handler: Connection => Unit at {io, async, global
31
30
internal::checkResult(internal::listen(listener, handler)); ()
32
31
}
33
32
34
- def shutdown(listener: Listener): Unit / Exception[IOError] = {
35
- internal::checkResult(internal::shutdown(listener)); ()
36
- }
33
+ def shutdown(listener: Listener): Unit =
34
+ internal::shutdown(listener)
37
35
38
36
namespace internal {
39
37
@@ -67,7 +65,7 @@ namespace internal {
67
65
ret void
68
66
"""
69
67
70
- extern async def close(handle: Int): Int =
68
+ extern async def close(handle: Int): Unit =
71
69
llvm """
72
70
call void @c_tcp_close(%Int ${handle}, %Stack %stack)
73
71
ret void
@@ -85,7 +83,7 @@ namespace internal {
85
83
ret void
86
84
"""
87
85
88
- extern async def shutdown(handle: Int): Int =
86
+ extern async def shutdown(handle: Int): Unit =
89
87
llvm """
90
88
call void @c_tcp_shutdown(%Int ${handle}, %Stack %stack)
91
89
ret void
0 commit comments