Next: , Previous: , Up: net channels ifaces   [Index]


20.3.2 The <<binary-input-channel>> interface

The following syntactic bindings are exported by the library (vicare net channels).

Interface Type: <<binary-input-channel>>
Parent Type: <<channel>>

Expose the methods for all the binary input channels.

Method on <<binary-input-channel>>: <binary-terminators> message-terminators this
Method on <<binary-input-channel>>: <void> message-terminators this {terminators <binary-terminators>}

Accessor and mutator for the message termination markers. The argument terminators must represent the possible message terminators for this channel; when a terminator is received at the end of a chunk of data, the message is considered terminated.

Method on <<binary-input-channel>>: <void> recv-begin! this

Configure the channel to receive a new message. If this is not inactive: an assertion is raised.

Method on <<binary-input-channel>>: recv-end!/rbl this

Terminate the action of receiving a message. If this is not in the course of receiving a message: an assertion is raised.

Return two values:

  1. A <positive-fixnum> representing the total length of the message as number of bytes.
  2. A (list-of <nebytevector>) representing the received data as reverse buffer list (RBL), including the message terminator.

After this function is applied to a channel: the channel itself is reset to inactive; so it is available to start receiving another message or to send a message.

Method on <<binary-input-channel>>: <nebytevector> recv-end! this

Terminate the action of receiving a message. If this is not in the course of receiving a message: an assertion is raised. If this is not in “message terminated” status: an assertion is raised. Return a bytevector holding the full message, including the message terminator.

After this function is applied to a channel: the channel itself is reset to inactive; so it is available to start receiving another message or to send a message.

Method on <<binary-input-channel>>: <void> recv-abort! this

Abort the current operation and reset the channel to inactive. If this is not in the course of receiving a message: an assertion is raised.

Method on <<binary-input-channel>>: (or <eof> <would-block> <boolean>) recv-message-portion! this

Receive a portion of message. If this is not in the course of receiving a message: an assertion is raised.

Method on <<binary-input-channel>>: (or <eof> <bytevector>) recv-full-message this

Receive a full message. When successful return a bytevector representing the full message. If this is not inactive: an assertion is raised. If the underlying device is closed before the message is completed: return the EOF object.


Next: , Previous: , Up: net channels ifaces   [Index]