Last active
January 7, 2020 20:24
-
-
Save back2dos/cdfa878fff8d33b1685364ec5d27bf5b to your computer and use it in GitHub Desktop.
apis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface IReadable { | |
final dataSignal:Signal<Bytes>; | |
final endSignal:Signal<NoData>; | |
final errorSignal:Signal<Error>; | |
final pauseSignal:Signal<NoData>; | |
final resumeSignal:Signal<NoData>; | |
function resume():Void; | |
function pause():Void; | |
function pipe(target:IWritable):Void; | |
} | |
interface IWritable { | |
final drainSignal:Signal<NoData>; | |
final finishSignal:Signal<NoData>; | |
final pipeSignal:Signal<IReadable>; | |
final unpipeSignal:Signal<IReadable>; | |
function write(chunk:Bytes):Bool; | |
function end():Void; | |
function cork():Void; | |
function uncork():Void; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface IReadable { | |
function read(target:Bytes, offset:Int, length:Int, (error:Error, bytesRead:Int)>Void); | |
function close():Void; | |
//optional | |
function prepare(capacity:Int):Void; | |
} | |
interface IWritable { | |
function write(target:Bytes, offset:Int, length:Int, (error:Error, bytesRead:Int)>Void); | |
function close():Void; | |
//optional | |
function flush():Void; | |
function prepare(capacity:Int):Void; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment