<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Moonset]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/iamlate</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; iamlate]]></copyright><item><title><![CDATA[使用C语言来扩展PHP，写PHP扩展dll]]></title><link>https://blog.csdn.net/iamlate/article/details/7405476</link><guid>https://blog.csdn.net/iamlate/article/details/7405476</guid><author>iamlate</author><pubDate>Thu, 29 Mar 2012 02:44:04 +0800</pubDate><description><![CDATA[以前写过一次PHP扩展DLL，那个是利用调用系统的COM口实现的扩展，与PHP不能真正融合。心血来潮，研究了一下PHP的源码，网上找了一些资料，自己尝试写了一个扩展DLL，测试没问题。下面记录一下具体扩展方法：
　　1、首先从www.php.net网站上下载php源码，此处以php-5.2.17版本为例，下载后解压至E：盘根目录下（目录可以自己随意定）。
　　2、下载安装VC++ 6.0，因为]]></description><category></category></item><item><title><![CDATA[警告: assignment makes pointer from integer without a cast的另外一种原因]]></title><link>https://blog.csdn.net/iamlate/article/details/6968105</link><guid>https://blog.csdn.net/iamlate/article/details/6968105</guid><author>iamlate</author><pubDate>Mon, 14 Nov 2011 11:35:54 +0800</pubDate><description><![CDATA[char * = rtnString();
原因是rtnString()函数没有在使用前声明。]]></description><category></category></item><item><title><![CDATA[libxml库之xmlParseMemory和xmlDocDumpFormatMemory函数]]></title><link>https://blog.csdn.net/iamlate/article/details/6955698</link><guid>https://blog.csdn.net/iamlate/article/details/6955698</guid><author>iamlate</author><pubDate>Thu, 10 Nov 2011 12:54:10 +0800</pubDate><description><![CDATA[两个函数，怎么在内存中处理xml文件。有个疑问，xmlChar *xmlbuff;这样系统第一次分配了xmlbuff的大小以后。对xml做修改，可以成功吗。
有空试试。


函数原型：
xmlParseMemory

xmlDocPtr	xmlParseMemory		(const char * buffer, 
					 int size)

parse an XML in-memo]]></description><category></category></item><item><title><![CDATA[带有xml转发的select非阻塞，修正了一个错误]]></title><link>https://blog.csdn.net/iamlate/article/details/6950644</link><guid>https://blog.csdn.net/iamlate/article/details/6950644</guid><author>iamlate</author><pubDate>Wed, 09 Nov 2011 00:34:00 +0800</pubDate><description><![CDATA[修改部分在transfer.c第288行，修改如下
ptr = conns[m].totalBuffer;
conns[m].edSize = 0;//-----------------------



同一文件，这样修改貌似可以减少提示出现的不是utf-8字符串的问题。
79 content[target->XmlLength+1] = '/0';//about utf-8
p]]></description><category></category></item><item><title><![CDATA[%m和其他参数]]></title><link>https://blog.csdn.net/iamlate/article/details/6949149</link><guid>https://blog.csdn.net/iamlate/article/details/6949149</guid><author>iamlate</author><pubDate>Tue, 08 Nov 2011 17:59:47 +0800</pubDate><description><![CDATA[GNU glibc provides an extension to printf, %m, which outputs strerror(errno).
This specifications fields only available on glibc, not portable
to other compiler, like VC 6.0.


e.g.
#include 
#]]></description><category></category></item><item><title><![CDATA[文件描述符与Linux文件IO]]></title><link>https://blog.csdn.net/iamlate/article/details/6948609</link><guid>https://blog.csdn.net/iamlate/article/details/6948609</guid><author>iamlate</author><pubDate>Tue, 08 Nov 2011 16:20:58 +0800</pubDate><description><![CDATA[Linux系统可以看成是一个由文件组成的系统，在linux系统中，基本上所有的设备，硬件，资源都被看成一个文件，比如，在/dev下面我们可以看到我们的硬盘sda1(我的机器是安装的SCIS硬盘的虚拟机)，终端设备ttyn，在/proc目录下面我们可以看到当前的内存信息，cat /proc/meminfo,可以查看CPU的信息: cat /proc/cpuinfo , 这些文件都是被linux系统抽]]></description><category></category></item><item><title><![CDATA[两个应该注意的小问题]]></title><link>https://blog.csdn.net/iamlate/article/details/6948336</link><guid>https://blog.csdn.net/iamlate/article/details/6948336</guid><author>iamlate</author><pubDate>Tue, 08 Nov 2011 15:31:31 +0800</pubDate><description><![CDATA[1，套接口程序中使用的int,short,long等数字数据需要网络字节序的转化。
2，]]></description><category></category></item><item><title><![CDATA[反思：关于select的一些经历]]></title><link>https://blog.csdn.net/iamlate/article/details/6947512</link><guid>https://blog.csdn.net/iamlate/article/details/6947512</guid><author>iamlate</author><pubDate>Tue, 08 Nov 2011 12:33:38 +0800</pubDate><description><![CDATA[今天交了，该了几改的程序。是一个服务器转发聊天程序，第一次是在别人例子的基础上直接做得。后来，发现我用得时阻塞，当时考虑的问题太多。包括一个包分了好几次才收到，或者一次收到了，相互独立且完整的几个包。
最重要的一个问题是，在使用费阻塞的io以后，因为对select的FD_ISSET理解错误（我认为是不是变化，但事实上是不是在集合内），我对select返回可读套接字后能不能一定读到数据产生了疑问。]]></description><category></category></item><item><title><![CDATA[关于initializer element is not constant错误]]></title><link>https://blog.csdn.net/iamlate/article/details/6920630</link><guid>https://blog.csdn.net/iamlate/article/details/6920630</guid><author>iamlate</author><pubDate>Mon, 31 Oct 2011 10:57:50 +0800</pubDate><description><![CDATA[关于 static storage duration: C99 6.2.4 Storage durations of objects 第3款： 3 An object whose identifier is declared with external or internal linkage, or with the storage-class
 specifier static has sta]]></description><category></category></item><item><title><![CDATA[Ｃ语言提供了六种位运算符]]></title><link>https://blog.csdn.net/iamlate/article/details/6916537</link><guid>https://blog.csdn.net/iamlate/article/details/6916537</guid><author>iamlate</author><pubDate>Sat, 29 Oct 2011 12:16:31 +0800</pubDate><description><![CDATA[一、位运算符Ｃ语言提供了六种位运算符：

& 按位与
| 按位或
^ 按位异或
~ 取反

>> 右移


1. 按位与运算

按位与运算符"&"是双目运算符。其功能是参与运算的两数各对应的二进位相与。只有对应的两个二进位均为1时，结果位才为1 ，否则为0。参与运算的数以补码方式出现。

例如：9&5可写算式如下： 00001001 (9的二进制补码)&00000101]]></description><category></category></item><item><title><![CDATA[使用select+非阻塞socket写的网络数据转发程序]]></title><link>https://blog.csdn.net/iamlate/article/details/6916166</link><guid>https://blog.csdn.net/iamlate/article/details/6916166</guid><author>iamlate</author><pubDate>Sat, 29 Oct 2011 01:49:54 +0800</pubDate><description><![CDATA[在与远程服务器connect的时候，程序要等待连接完全建立完毕才返回，这里会让程序产生延迟。而在非阻塞中不会等待，直接去处理其它连接。
“程序有问题，暂时未仔细看”



#include   
#include   
#include   
#include   
#include   
#include   
#include   
  
#define closesocket cl]]></description><category></category></item><item><title><![CDATA[linux非阻塞的socket EGGAIN的错误处理]]></title><link>https://blog.csdn.net/iamlate/article/details/6916127</link><guid>https://blog.csdn.net/iamlate/article/details/6916127</guid><author>iamlate</author><pubDate>Sat, 29 Oct 2011 00:55:00 +0800</pubDate><description><![CDATA[在Linux中使用非阻塞的socket的情形下。
（一）发送时


　　当客户通过Socket提供的send函数发送大的数据包时，就可能返回一个EGGAIN的错误。该错误产生的原因是由于send 函数中的size变量大小超过了tcp_sendspace的值。tcp_sendspace定义了应用在调用send之前能够在kernel中缓存的数据量。当应用程序在socket中设置了O_NDELA]]></description><category></category></item><item><title><![CDATA[linux下非阻塞的tcp研究]]></title><link>https://blog.csdn.net/iamlate/article/details/6916118</link><guid>https://blog.csdn.net/iamlate/article/details/6916118</guid><author>iamlate</author><pubDate>Sat, 29 Oct 2011 00:46:49 +0800</pubDate><description><![CDATA[这是根据自己的笔记整理的,如有错误,欢迎指出来.
　　tcp协议本身是可靠的,并不等于应用程序用tcp发送数据就一定是可靠的.不管是否阻塞,send发送的大小,并不代表对端recv到多少的数据.
　　在阻塞模式下,send函数的过程是将应用程序请求发送的数据拷贝到发送缓存中发送并得到确认后再返回.但由于发送缓存的存在,表现为:如果发送缓存大小比请求发送的大小要大,那么send函数立即返回,同时]]></description><category></category></item><item><title><![CDATA[关于IO阻塞和非阻塞的零碎知识]]></title><link>https://blog.csdn.net/iamlate/article/details/6916083</link><guid>https://blog.csdn.net/iamlate/article/details/6916083</guid><author>iamlate</author><pubDate>Sat, 29 Oct 2011 00:03:25 +0800</pubDate><description><![CDATA[1, 关于阻塞的概念


阻塞（Block）这个概念。当进程调用一个阻塞的系统函数时，该进程被置于睡眠（Sleep）状态，这时内核调度其它进程运行，直到该进程等待的事件发生了（比如网络上接收到数据包，或者调用sleep指定的睡眠时间到了）它才有可能继续运行。与睡眠状态相对的是运行（Running）状态，在Linux内核中，处于运行状态的进程分为两种情况：


正在被调度执行。CPU处于]]></description><category></category></item><item><title><![CDATA[read/write的包裹函数]]></title><link>https://blog.csdn.net/iamlate/article/details/6916053</link><guid>https://blog.csdn.net/iamlate/article/details/6916053</guid><author>iamlate</author><pubDate>Fri, 28 Oct 2011 23:43:34 +0800</pubDate><description><![CDATA[《Unix环境高级编程》
ssize_t writen (int fd, const void *buf, size_t num)  
{  
ssize_t res;  
size_t n;  
const char *ptr;  
  
  
n = num;  
ptr = buf;  
while (n > 0) {  
/* 开始写*/   
     if ((res = write]]></description><category></category></item><item><title><![CDATA[关于errno与perror,strerror函数]]></title><link>https://blog.csdn.net/iamlate/article/details/6915421</link><guid>https://blog.csdn.net/iamlate/article/details/6915421</guid><author>iamlate</author><pubDate>Fri, 28 Oct 2011 18:01:06 +0800</pubDate><description><![CDATA[errno是一个由POSIX和ISO C标准定义的符号，看（用）起来就好像是一个整形变量。当系统调用或库函数发生错误的时候，比如以只读方式打开一个不存在的文件时，它的值将会被改变，根据errno值的不同，我们就可以知道自己的程序发生了什么错误，然后进行相应的处理。有人说，函数不是可以返回值吗，根据返回值照样可以判断程序在哪里出错了，为什么还需要errno？如果你有这样的疑问，推荐你看下这篇文章。]]></description><category></category></item><item><title><![CDATA[不能两次使用waitpid等待一个子进程的结束]]></title><link>https://blog.csdn.net/iamlate/article/details/6911536</link><guid>https://blog.csdn.net/iamlate/article/details/6911536</guid><author>iamlate</author><pubDate>Thu, 27 Oct 2011 17:43:00 +0800</pubDate><description><![CDATA[无意中在主线程和SIGCHLD信号函数中，同时使用了waitpid，结果waitpid不返回子进程pid了]]></description><category></category></item><item><title><![CDATA[Linux文件rwx属性的含义]]></title><link>https://blog.csdn.net/iamlate/article/details/6910510</link><guid>https://blog.csdn.net/iamlate/article/details/6910510</guid><author>iamlate</author><pubDate>Thu, 27 Oct 2011 14:14:06 +0800</pubDate><description><![CDATA[Linux上的文件以.开头的文件被系统视为隐藏文件，仅用ls命令是看不到他们的，而用ls -a除了显示 一般文件名外，连隐藏文件也会显示出来。
　　ls -l(这个参数是字母L的小写，不是数字1)
　　这个命令可以使用长格式显示文件内容，如果需要察看更详细的文件资料，就要用到ls -l这个指令。例如我在某个目录下键入ls -l可能会显示如下信息(一共7个栏位)：
　　文件属性 文件数 拥有者]]></description><category></category></item><item><title><![CDATA[父子进程之间的参数传递和数据返回 pthread_create & pthread_join]]></title><link>https://blog.csdn.net/iamlate/article/details/6909147</link><guid>https://blog.csdn.net/iamlate/article/details/6909147</guid><author>iamlate</author><pubDate>Thu, 27 Oct 2011 02:43:18 +0800</pubDate><description><![CDATA[自己睡不着敲着玩的，第一个程序是主线程传递一个结构体地址给子线程，第二个传递字符串，第三个是子线程通过pthread_exit()传递数据，然后pthread_join阻塞那里捕获。
 int pthread_create(pthread_t *restrict thread,
                  const pthread_attr_t *restrict attr,]]></description><category></category></item><item><title><![CDATA[信号量和进程共享内存的小例子]]></title><link>https://blog.csdn.net/iamlate/article/details/6907314</link><guid>https://blog.csdn.net/iamlate/article/details/6907314</guid><author>iamlate</author><pubDate>Wed, 26 Oct 2011 15:18:42 +0800</pubDate><description><![CDATA[semm.h

#include 
#include 
#include 
#include 
#include 
#include 

typedef int sem_t;

union semun{
	int val;
	struct semid_ds *buf;
	unsigned short *array;
} arg;


sem_t CreateSem(key_t key, int]]></description><category></category></item></channel></rss>