标签:
socket设置地址复用
/*Setsockopt()*/
void Setsockopt(int listenfd)
{
int reuse = 1;
if (setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse)) < 0)
ERR_EXIT("setsockopt");
}
标签:
原文地址:http://www.cnblogs.com/Dreamer-lwp/p/5349778.html