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


20.2.5 The <textual-input-only-channel> type

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

Record Type: <textual-input-only-channel>
Parent Type: <channel>

Expose the methods for all the textual input–only channels.

Method on <textual-input-only-channel>: <textual-input-port> connect-in-port this

The input or input/output textual port used to receive messages from a remote process.

Method on <textual-input-only-channel>: <positive-fixnum> maximum-message-portion-size this
Method on <textual-input-only-channel>: <void> maximum-message-portion-size this <positive-fixnum>

Accessor and mutator for the maximum number of characters read at each “receive message portion” operation.

Method on <textual-input-only-channel>: <textual-terminators> message-terminators this
Method on <textual-input-only-channel>: <void> message-terminators this {terminators <textual-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 <textual-input-only-channel>: <void> recv-begin! this

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

Method on <textual-input-only-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 characters.
  2. A (list-of <nestring>) 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 <textual-input-only-channel>: <nestring> 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 string 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 <textual-input-only-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 <textual-input-only-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 <textual-input-only-channel>: (or <eof> <string>) recv-full-message this

Receive a full message. When successful return a string 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 channels   [Index]