linux编程之网络编程错误处理

来源:互联网 发布:简明python教程 mobi 编辑:程序博客网 时间:2024/05/20 03:45

#include <netdb.h>

void herror(const char*s)//先输出参数中的字符串,再输出系统提供调用网络函数发生错误时的错误信息,无错误会输出“Resolver Erroe 0(no error)”

extern int h_errno;//存储最近一次错误的错误号,这个变量在外部已经定义了

char *hstrerror(int err)将错误号转换为字符串

0 0