在《Unix网络编程》中,主要讲Client和Server的交互。有一些规则:

1、在Client端,使用sockfd,而在Server端,使用listenfd:

Client:
sockfd = Socket(AF_INET, SOCK_STREAM, 0);

Server:
listenfd = Socket(AF_INET, SOCK_STREAM, 0);

相关文章:

  • 2021-10-26
  • 2021-06-05
  • 2022-12-23
  • 2021-05-07
  • 2021-10-29
  • 2022-12-23
  • 2021-12-25
  • 2022-03-07
猜你喜欢
  • 2022-12-23
  • 2021-08-17
  • 2021-05-28
  • 2022-01-22
  • 2021-09-25
  • 2021-10-21
  • 2021-10-30
相关资源
相似解决方案