标签:完整 art http server net eth mission targe amp
假设创建一个UDP Socket:
socketHandle = socket(serverAddr->ai_family, serverAddr->ai_socktype, serverAddr->ai_protocol);
int broadcastPermission = 1; setsockopt(socketHandle, SOL_SOCKET, SO_BROADCAST, (void *) &broadcastPermission, sizeof(broadcastPermission));
完整的UDP broadcast的样例见:《Socket tips: UDP Echo service - Client code》
Socket tips: 同意socket发送UDP Broadcast
标签:完整 art http server net eth mission targe amp
原文地址:http://www.cnblogs.com/llguanli/p/6747511.html