如果在 Socket 上设置了字符串解码器,或者解码器处于 objectMode,则可防止中止。
【Prevents an abort if a string decoder was set on the Socket or if the decoder
is in objectMode.】
const Socket = require('node:net').Socket;
const instance = new Socket();
instance.setEncoding('utf8');