web | Java

怎么创建一个udp套接字

千锋教育

int sockfd = 0; sockfd = socket(AF_INET,SOCK_DGRAM,0); if(sockfd < 0) { perror("socket"); exit(-1); }