The work in #135 should probably move to the public headers and APIs, several of which are doing the "-1=error, 0=wouldblock, 1=success" thing.