原创 Linux套接字通信常用函數-listen

服務器在調用socket、bind函數之後就會調用listen來監聽這個socket,如果客戶端這時調用connect發出連接請求,服務器端就會接收到這個請求。 無論tcp或者udp都會用到。 int listen(int sockfd,