Unix sockets: when to use bind() function?

前端 未结 5 449
暖寄归人
暖寄归人 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:27

    After reading your updated question. I would suggest not to use bind() function while making client calls. The function is used, while writing your own server, to bind the socket (created after making a call to socket()) to a physical address.

    For further help look at this tutorial

    Client Server Model

提交回复
热议问题