recvfrom() strange operation
- From: kzsolt@xxxxxxxxxx
- Date: 7 Sep 2006 09:12:24 -0700
Linux SU9.3 I586 K: 2.6.11.4-21.11 / GCC 3.3.5
I send one packet trough SOCK_DGRAM socket (UDP) like this
sendto(sockfd,"abcdefghijklmnop",16,0,xxx,nnn);
On a receiver sied in case of:
recvfrom(sockfd,p,16,0,xxx,nnn);
the p contain "abcdefghijklmnop"
but in case of:
recvfrom(sockfd,p,1,0,xxx,nnn);
recvfrom(sockfd,q,15,0,xxx,nnn);
the p contain "a"
the q is empty (insted of "bcdefghijklmnop")
If I use SOCK_STREAM (TCP) ths same code working fine.
This mean for me some defragmentatnion missing from kernel. This is
strange because the fragmentation is implemented in transmit side (I
can send the sample packet with 16 time sendto()).
Anybody has idea how to I solve this problem?
In my live code of course mouch complex and working longer datas, so
this is a sample only.
.
- Follow-Ups:
- Re: recvfrom() strange operation
- From: steve_schefter
- Re: recvfrom() strange operation
- From: Lew Pitcher
- Re: recvfrom() strange operation
- Prev by Date: newbie questions
- Next by Date: Re: recvfrom() strange operation
- Previous by thread: newbie questions
- Next by thread: Re: recvfrom() strange operation
- Index(es):