未定义标识符socklen_t

windows下VS报错:
未定义标识符socklen_t

解决方案:
方法一:将socklen_t替换成int
方法二:使用宏定义,在文件前面加上#define socklen_t int

你可能感兴趣的:(c++)