如何把 cleartextStream 传递到 child_process 中啊?
发布于 11 年前 作者 zztczcx 4301 次浏览 最后一次编辑是 8 年前

有谁用过 tls 啊? 问题和这哥们一样 http://stackoverflow.com/questions/12971738/pass-tls-cleartextstream-instance-to-worker-process 但怎么具体实现啊。 我新建一个socket 然后 pipe 还是报错。

handle.onread = function() {};
                ^ TypeError: Cannot set property 'onread' of null
at ChildProcess.handleConversion.net.Socket.send (child_process.js:134:21)
at ChildProcess.target.send (child_process.js:436:52)
at Server.<anonymous> (/Users/zcx/BestApp/android-mqtt-push-server/server_master_zmq.js:171:12)
at Server.EventEmitter.emit (events.js:98:17)
at SecurePair.<anonymous> (tls.js:1117:16)
at SecurePair.g (events.js:175:14)
at SecurePair.EventEmitter.emit (events.js:92:17)
at SecurePair.maybeInitFinished (tls.js:896:10)
at CleartextStream.read [as _read] (tls.js:430:15)
at CleartextStream.Readable.read (_stream_readable.js:294:10)
回到顶部