dm_netstring_write Subroutine

public pure elemental subroutine dm_netstring_write(input, output, length, error)

Writes input bytes input in netstring format to output buffer output. The length of the netstring is returned in length. The output buffer is not cleared!

Argument error is set to the following error codes:

  • E_BOUNDS if the netstring is larger than output buffer.
  • E_LIMIT if the input size is > 999999999 bytes.
  • E_WRITE if an I/O error occured.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(inout) :: input

Input buffer.

character(len=*), intent(inout) :: output

Netstring buffer.

integer, intent(out), optional :: length

Length of netstring.

integer, intent(out), optional :: error

Error code.