This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

请问如何提取客户端的IP地址



  recvfrom(sudp,strRecv,sizeof(strRecv),0,( struct sockaddr *)&client_addr,&addr_len);

服务器端接收到来自客户端的数据之后,如何打印客户端的ip地址client_addr?