// //------------------ DOK FILE -------------------------------------------------- +Header streams =pkg bios =title Streams =short Common structure for Streams =desc Streams are: sockets (udp, tcp, ethernet), keyboard input, serial, ... Streams may also encapsulate other streams, such as TLS, to add TLS support to any stream. Streams may generate events (read, write, accept). // // //------------------ PROTO ----------------------------------------------------- Stream +Proto Stream =type Stream =mode structure =pkg bios =impl mcy =link =desc // // //------------------ PROTO ----------------------------------------------------- streamAbort +Proto streamAbort =type fun a1{Stream} -> Bool =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg result =type Bool =desc // // //------------------ PROTO ----------------------------------------------------- streamAcceptEvent +Proto streamAcceptEvent =type fun a1{Stream} Stream -> Int =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg stream =type Stream =desc // +arg result =type Int =desc // // //------------------ PROTO ----------------------------------------------------- streamCheck +Proto streamCheck =type fun a1{Stream} -> Bool =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg result =type Bool =desc // // //------------------ PROTO ----------------------------------------------------- streamClose +Proto streamClose =type fun a1{Stream} -> Bool =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg result =type Bool =desc // // //------------------ PROTO ----------------------------------------------------- streamCommonClose +Proto streamCommonClose =type fun a1{Stream} -> Bool =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg result =type Bool =desc // // //------------------ PROTO ----------------------------------------------------- streamDetail +Proto streamDetail =type fun a1{Stream} -> Str =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg result =type Str =desc // // //------------------ PROTO ----------------------------------------------------- streamInit +Proto streamInit =type fun a1{Stream} Socket Str Str (fun -> Int) (fun Str Int -> Int) (fun -> Bool) -> a1{Stream} =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg socket =type Socket =desc // +arg type =type Str =desc // +arg name =type Str =desc // +arg onSelectRead =type fun -> Int =desc // +arg fWrite =type fun Str Int -> Int =desc // +arg fClose =type fun -> Bool =desc // +arg result =type a1{Stream} =desc // // //------------------ PROTO ----------------------------------------------------- streamLastTouch +Proto streamLastTouch =type fun a1{Stream} -> Int =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg result =type Int =desc // // //------------------ PROTO ----------------------------------------------------- streamOnAccept +Proto streamOnAccept =type fun a1{Stream} (fun Stream -> a2) -> a1{Stream} =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg onAccept =type fun Stream -> a2 =desc // +arg result =type a1{Stream} =desc // // //------------------ PROTO ----------------------------------------------------- streamOnEvent +Proto streamOnEvent =type fun a1{Stream} (fun Str -> a2) (fun -> a3) -> a1{Stream} =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg onRead =type fun Str -> a2 =desc // +arg onWrite =type fun -> a3 =desc // +arg result =type a1{Stream} =desc // // //------------------ PROTO ----------------------------------------------------- streamReadEvent +Proto streamReadEvent =type fun a1{Stream} Str -> Int =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg data =type Str =desc // +arg result =type Int =desc // // //------------------ PROTO ----------------------------------------------------- streamSetIdleTimeout +Proto streamSetIdleTimeout =type fun a1{Stream} Int -> a1{Stream} =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg idleTimeout =type Int =desc // +arg result =type a1{Stream} =desc // // //------------------ PROTO ----------------------------------------------------- streamSetReadable +Proto streamSetReadable =type fun a1{Stream} Bool -> Socket =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg value =type Bool =desc // +arg result =type Socket =desc // // //------------------ PROTO ----------------------------------------------------- streamSetSelectRead +Proto streamSetSelectRead =type fun a1{Stream} Bool -> Socket =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg value =type Bool =desc // +arg result =type Socket =desc // // //------------------ PROTO ----------------------------------------------------- streamSetSelectWrite +Proto streamSetSelectWrite =type fun a1{Stream} Bool -> Socket =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg value =type Bool =desc // +arg result =type Socket =desc // // //------------------ PROTO ----------------------------------------------------- streamSetWritable +Proto streamSetWritable =type fun a1{Stream} Bool -> Socket =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg value =type Bool =desc // +arg result =type Socket =desc // // //------------------ PROTO ----------------------------------------------------- streamSocket +Proto streamSocket =type fun a1{Stream} -> Socket =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg result =type Socket =desc // // //------------------ PROTO ----------------------------------------------------- streamTerminated +Proto streamTerminated =type fun a1{Stream} -> Bool =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg result =type Bool =desc // // //------------------ PROTO ----------------------------------------------------- streamType +Proto streamType =type fun a1{Stream} -> Str =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg result =type Str =desc // // //------------------ PROTO ----------------------------------------------------- streamWrite +Proto streamWrite =type fun a1{Stream} Str Int -> Int =mode function =pkg bios =impl mcy =link =desc // +arg s =type a1{Stream} =desc // +arg data =type Str =desc // +arg start =type Int =desc // +arg result =type Int =desc