Nodejs TCP connection client port assignment

后端 未结 2 862
没有蜡笔的小新
没有蜡笔的小新 2020-12-21 05:39

I created tcp connection between client and server using nodejs (net module). Server is listening on already predefined port and client is connecting to that port.

A

2条回答
  •  Happy的楠姐
    2020-12-21 06:09

    The selected answer is provides a lot of info, but does not deal with the underlying problem. Node does not appear to allow https.request to specify a port for the client. There exist localAddress and localPort options, but they appear to be broken.

    I've opened a new question on this issue. Hopefully someone will answer with something other than "just don't do that."

    Is there a way to set the source port for a node js https request?

提交回复
热议问题