How to send huge data via sockets in continuous intervals
-
Our MFC Server application send huge real time data of size 900000bytes using CSocket (TCP/IP Sockets) via serialization continuously every 2 second to the MFC Client. But After a few minutes, the application gets slowed down. Is there any specific ways or methods of send/receive huge data continuosly via Csocket. How to send the big data every interval in a better way.
-
Our MFC Server application send huge real time data of size 900000bytes using CSocket (TCP/IP Sockets) via serialization continuously every 2 second to the MFC Client. But After a few minutes, the application gets slowed down. Is there any specific ways or methods of send/receive huge data continuosly via Csocket. How to send the big data every interval in a better way.
Increase Baudrate of CSocket and reduce data chunk size while communication.. big data if reduced to small data chunks with sequence added in the data packet may help in faster data transfer across systems.. look in windows provided CSocket for more info ;)
-
Our MFC Server application send huge real time data of size 900000bytes using CSocket (TCP/IP Sockets) via serialization continuously every 2 second to the MFC Client. But After a few minutes, the application gets slowed down. Is there any specific ways or methods of send/receive huge data continuosly via Csocket. How to send the big data every interval in a better way.
reduce time interval to 500ms interval upto 4 subiteration in 1st iteration.. (which in effect will result in 2s interval) and after 4th subiteration append all data at client side. ;)
-
Increase Baudrate of CSocket and reduce data chunk size while communication.. big data if reduced to small data chunks with sequence added in the data packet may help in faster data transfer across systems.. look in windows provided CSocket for more info ;)
Can i get more information in this regard...reducing to small data chunks with sequence added in the data packet. How many data chunks could be done for 900000bytes of data. Please give me the steps or some example and detail.
-
Our MFC Server application send huge real time data of size 900000bytes using CSocket (TCP/IP Sockets) via serialization continuously every 2 second to the MFC Client. But After a few minutes, the application gets slowed down. Is there any specific ways or methods of send/receive huge data continuosly via Csocket. How to send the big data every interval in a better way.
Hi, You need your own Protocol, and need to remember that the Internet can only deal with a limited ascii character set. I take it that this is not an issue. The first step is to send your data in packages of, say 4K to 64K in size. A single large lot will Clog up the channel, because of in evitable channel errors. With a large block of Data frequently sent, the socket becomes overloaded, and on fault, requires a resent of the entire package. Break the entire data up in say 4K Blocks The way of doing this, is, by breaking up each data block to be send, into blocks, and sending them preceded with a header field containing a Unique Identifier,to confirm the data, and, a Block Order Number. At the Other End, you have a thread that stitches the data together again,.
Bram van Kampen
-
Can i get more information in this regard...reducing to small data chunks with sequence added in the data packet. How many data chunks could be done for 900000bytes of data. Please give me the steps or some example and detail.
create a struct data structure similar to: struct myPacket{ int uwSeq;// sequencing starts from 1 upto 879 int maxSeqCount;// when this reaches 879 reaset to 1 char myData[1024];//Small Chunk unsigned int uwcrcData;//CRC of uwSeq,myData }stSmallChunk; send stSmallChunk data packet and validate at other end using CRC recieved seqs. FYI: 1024*879 small chunks =900096 Bytes -Shyam Kodase