OptionalencodingThe encoding to use when data is a string.
Supported encodings:
'utf8' (default): Standard UTF-8 text encoding'ascii': 7-bit ASCII encoding'base64': Base64-encoded data'hex': Hexadecimal string representationWhen writing an ArrayBuffer, this option is ignored.
OptionaltagsOptional key-value pairs for metrics collection and logging. These tags will be attached to write-related metrics for this specific operation.
Tags specified here will be merged with socket-level and connection-level tags. Operation-level tags take highest priority for duplicate keys.
Configuration options for writing data to a TCP socket.
Example