码迷,mamicode.com
首页 >  
搜索关键字:strerror    ( 69个结果
IOS中Socket常用处理
001/*SendTCPtransportdatapacket*/ 002void 003tcp_data_send(NSOutputStream*os,void*data,intlength) 004{ 005intsent,total=0; 006while(total<length){ 007sent=[oswrite:data+totalmaxLength:length-total]; 008if(sent<0){ 009error("send:%s\n",strerror(errno))..
分类:移动开发   时间:2015-02-02 20:07:05    阅读次数:325
perror 与 strerror
errno、stderr、perror函数和strerror函数errno表示错误代码。记录系统的最后一次错误代码。代码是一个int型的值,在errno.h中定义。系统每一次出错都会对应一个出错代码,例如12表示“Cannot allocate memory"。stderr 是linux(unix)...
分类:其他好文   时间:2015-01-30 15:04:09    阅读次数:171
strerror 函数
收藏 7523strerror编辑本词条缺少名片图,补充相关内容使词条更完整,还能快速升级,赶紧来编辑吧!通过标准错误的标号,获得错误的描述字符串 ,将单纯的错误标号转为字符串描述,方便用户查找错误。外文名strerror语言C语言参数错误标号(即error)返回值描述字符串(char *)目录1函...
分类:其他好文   时间:2015-01-30 14:47:52    阅读次数:325
APUE1.7出错处理
#include "apue.h" #include int main(int argc, char *argv[]) { fprintf(stderr, "EACCES: %s\n", strerror(EACCES)); errno = ENOENT; perror(argv[0]); exit...
分类:其他好文   时间:2015-01-29 21:04:21    阅读次数:160
ZeroMQ接口函数之 :zmq_strerror - 获取ZMQ错误描述字符串
ZeroMQ 官方地址 :http://api.zeromq.org/4-0:zmq_strerrorzmq_strerror(3) ØMQManual-ØMQ/4.1.0Namezmq_strerror-获取ZMQ错误描述字符串Synopsisconst char *zmq_strerro...
分类:其他好文   时间:2015-01-28 00:46:54    阅读次数:149
linux c 系统报错
本文中的错误是指在代码编译完全正确程序可运行的情况下,因为没有成功调用程序中的某些系统调用函数而产生的错误。往往这些系统调用函数通过返回值(比如1,0,-1)来说明其是否调用成功,而程序员需要知道详细的错误信息,因此自建错误捕获函数很有必要。(1)errno和strerror()errno它是一个整...
分类:系统相关   时间:2014-12-09 15:35:55    阅读次数:208
socket 例子
socket.php<?phperror_reporting(E_ALL);set_time_limit(0);//ob_implicit_flush();$address=‘127.0.0.1‘;$port=10005;//创建端口if(($sock=socket_create(AF_INET,SOCK_STREAM,SOL_TCP))===false){echo"socket_create()failed:reason:".socket_strerror(socket_last_error(..
分类:其他好文   时间:2014-12-06 06:46:28    阅读次数:179
Linux/Unix C编程之的perror函数,strerror函数,errno
#include // void perror(const char *msg); #include // char *strerror(int errnum); #include //errno errno 是错误代码,在 errno.h头文件中; perror是错误输出函数,输出格式为:msg:...
分类:系统相关   时间:2014-11-19 23:47:27    阅读次数:629
linux 下各errno的意义
strerror(errno):获取errno对应的错误#include /* for strerror */#include #include int main(int argc, char ** argv) { int i = 0; for(i = 0...
分类:系统相关   时间:2014-11-05 10:39:31    阅读次数:262
strerror() 和perror()函数
在linux编程中,strerror()是个好东东,因为一个孤零零的errno看不出个所以然,然而strerror()返回的错误描述已经给我们解决问题提供了80%的成功率。但从安全性的角度来讲,strerror_r是更好的选择,因为:#include char *strerror(int errnu...
分类:其他好文   时间:2014-10-26 11:28:51    阅读次数:218
69条   上一页 1 ... 4 5 6 7 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!