Unix sockets: when to use bind() function?

前端 未结 5 444
暖寄归人
暖寄归人 2021-02-04 12:21

I\'ve not a clear idea about when I have to use the bind() function. I guess it should be used whenever I need to receive data (i.e. recv() or recvfrom() functions) whether I\'m

5条回答
  •  伪装坚强ぢ
    2021-02-04 12:40

    you need to call bind() only in your server. It's needed especially for binding a #port to your socket.

提交回复
热议问题