resourceeio_syncfs(mixed$fd[,int$pri=EIO_PRI_DEFAULT[,callable$callback=NULL[,mixed$data=NULL]]]) Parameters fd Filedescriptor
Parameters fd Filedescriptor offset Thestartingbyteofthefilerangetobesynchronized nbytes Specifiesthelengthoftherangetobesynchronized
因此这里使用一个结构来处理所有类型的端口,以提高可读性:(1)typedefunsignedcharByte;(2)typedefunsignedintWord;(3)typedefstructuds_data{(4)intfd;/*Filedescriptor
error//Readinvokesfontheunderlyingconnection'sfile//descriptororhandle;fisexpectedtotrytoreadfromthe//filedescriptor