chickadee » cryptlib » open-input-object

(open-input-object HANDLE [DESTROY-ON-CLOSE? EOF-WHEN-EMPTY?]) => PORTprocedure

Wraps a cryptlib envelope or session object into an input port. If DESTROY-ON-CLOSE? is true, closing the port causes disposal of the underlying object using destroy-object.

If EOF-WHEN-EMPTY? is true, the port will enter the end-of-file state as soon as pop-data returns zero, otherwise the port will enter the end-of-file state as soon as pop-data reports an ERROR-READ. The former behaviour is suitable for envelopes, the latter for sessions.