aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/world/net.lux
blob: ff753f527fabac010a5178bb19a748e524b2ed6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(.module:
  [lux #*
   [data
    [error (#+ Error)]]
   [control
    [security
     ["!" capability (#+ capability:)]]]])

(type: #export Address Text)

(type: #export Port Nat)

(type: #export URL Text)

(type: #export Location
  {#address Address
   #port Port})

(capability: #export (Can-Read ! o)
  (can-read Nat (! (Error o))))

(capability: #export (Can-Write ! i)
  (can-write i (! (Error Any))))

(capability: #export (Can-Close !)
  (can-close [] (! (Error Any))))