Skip to content

createLineCodec

createLineCodec(encoding, options?): Codec<string>

Defined in: packages/format-core/src/codecs/line-codec.ts:19

Creates the CRLF-delimited line codec: one string per \n-terminated line on the way in, a \r\n terminator on the way out.

This is the framing for SMTP, LMTP, IMAP, POP3, IRC and most other text command protocols. Use LineDecoder or createLineEncoder directly where only one direction is needed; a FrameLink needs both.

Stateful across partial lines, so an instance must back exactly one driver.

TextEncodingName

LineDecoderOptions

Codec<string>