Forum Discussion
Altera_Forum
Honored Contributor
13 years agoHello dsl,
Thanking you, i am not expecting big packet. my Image server do the following tasks 1. Read a Raw (Contain only Pixel Info, no header and coding etc) Image of size 640x460. 2. Then Read first 640 byte and pack them in TCP packet, my TCP packet size is 640. total pixel's = 640x460, packet size = 640, then no of packet is = (640x460)/640= 460 SERVER SEND : 460 TCP packet of Size 640. below is the send routine.... do { length = send(sl,DataPacket[LPCount],PktSize,0); if(length <= -1) perror("Send Call failed"); LPCount++; printf("\t%d",length); }while(LPCount != (GPktCount)); 3. Send these packet toward NIOS_II based Client. (Who Collect These packet's ) below is the Receive routine...... LPktCount = 0; do { rc = recv(sockfd,ImgBuff[LPktCount],PktSize,0); if(rc <= -1) perror("Recv Call fail...!!"); printf("%d\t",rc); LPktCount++; }while((LPktCount) != (PktCount)); in both cases PktSIze = 640; Regards kaushal