<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi,all!<BR>
Now,I want use zaptel to my own program,just like asterisk use zaptel! When a write a simple test,I found a problem!It's that: I use the TDM410p card and loop the span2 and span4,then I write the channel 32 and read the data from channel 94,the code like this: <BR>
write.c<BR>
for(;;)<BR>
{<BR>
// fd is the value of func open return it point channel 32;buffer is memset(buffer,'a',1023);buffer[1023]='\0';<BR>
write(fd,buffer,1024);<BR>
}<BR>
<BR>
read.c<BR>
for(;;)<BR>
{<BR>
// fd is the value of func open return it point channel 94;readbuffer is filled with 0;<BR>
read(fd,readbuffer,1024);<BR>
}<BR>
then , the function read return 1024,and i use printf("%s",readbuffer); I found when i send 1023 'a',i recieve 1023 'a',but in twice,the first package with lots of 0xff and some 'a',the second package filled parts of 'a'.<BR>
How can i once recieve the 1023 'a'? Can any one help me ?<BR><RTE_TEXT></RTE_TEXT><br /><hr />查看 Windows Live™ 的更多精彩功能。
不只是收发邮件 — 了解Windows Live™ 的其他强大功能。
<a href='http://www.microsoft.com/windows/windowslive/' target='_new'>不只是收发邮件</a></body>
</html>