Click here to Skip to main content
15,898,769 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionEdit Subitems In Owner Drawn List Pin
DanYELL23-May-16 4:58
DanYELL23-May-16 4:58 
QuestionRe: Edit Subitems In Owner Drawn List Pin
Richard MacCutchan23-May-16 5:39
mveRichard MacCutchan23-May-16 5:39 
AnswerRe: Edit Subitems In Owner Drawn List Pin
DanYELL23-May-16 5:50
DanYELL23-May-16 5:50 
GeneralRe: Edit Subitems In Owner Drawn List Pin
leon de boer23-May-16 6:02
leon de boer23-May-16 6:02 
GeneralRe: Edit Subitems In Owner Drawn List Pin
Richard MacCutchan23-May-16 6:08
mveRichard MacCutchan23-May-16 6:08 
AnswerRe: Edit Subitems In Owner Drawn List Pin
leon de boer23-May-16 5:59
leon de boer23-May-16 5:59 
AnswerRe: Edit Subitems In Owner Drawn List Pin
Bram van Kampen1-Jun-16 16:09
Bram van Kampen1-Jun-16 16:09 
QuestionHow to send huge data via sockets in continuous intervals Pin
manoharbalu22-May-16 19:09
manoharbalu22-May-16 19:09 
Please refer my posting dated 29-Apr-16 3:52. I am still finding problem with that. Even If I try to send the data as small chunks as per the suggestions here, it gets struck or hanged.

Sever Side Code for Sending data:

void CMainFrame::OnSendactiveInsdata()
{
// TODO: Add your command handler code here
if(!InstClosedFlag)
{
TransData.Init();
long nSize = sizeof(struct TagModalDB);
memset(EsimData, 0, nSize);
memcpy(EsimData, Esim, nSize);

long nApproxSize = 900000;
int nEnd = 0;
long j = 0;
int nOffset = nApproxSize/100;
for (int i=0; i<100; i++)
{
TransData.Init();
memset(TestData, 0, 9000);
memcpy(TestData, EsimData + nEnd, nOffset);
for(j = 0; j < nOffset; j++)
{
TransData.m_sData.Insert(j, TestData[j]);

}
SendData(m_pInsSocket, &TransData);
nEnd += nOffset;
if ((nEnd + nOffset) > nSize) nOffset = nSize - nEnd;
}
Sleep(500);
}
}


Client Side Code for Receiving data:
void CMainFrame::ProcessPendingReadIns(void)
{
long nApproxSize = 900000;
int nEnd = 0;
long j = 0;
int nOffset = nApproxSize/100;
long nSize = sizeof(struct TagModalDB);
memset(EsimData, 0, nApproxSize);

for (int i=0; i<100; i++)
{
TransData.Init();
ReceiveData(&TransData);
memcpy(EsimData + nEnd, (const char*)TransData.m_sData, nOffset);
nEnd += nOffset;
if ((nEnd + nOffset) > nSize) nOffset = nSize - nEnd;
}
memcpy(Esim, EsimData, nSize);
Sleep(500);
}

Please provide me suggestions and step by step approach to send/receive huge data continously in cycles.



Previous Posting:

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.
AnswerRe: How to send huge data via sockets in continuous intervals Pin
Richard MacCutchan22-May-16 20:58
mveRichard MacCutchan22-May-16 20:58 
GeneralRe: How to send huge data via sockets in continuous intervals Pin
manoharbalu23-May-16 3:08
manoharbalu23-May-16 3:08 
GeneralRe: How to send huge data via sockets in continuous intervals Pin
Richard MacCutchan23-May-16 3:33
mveRichard MacCutchan23-May-16 3:33 
AnswerRe: How to send huge data via sockets in continuous intervals Pin
leon de boer22-May-16 22:16
leon de boer22-May-16 22:16 
GeneralRe: How to send huge data via sockets in continuous intervals Pin
manoharbalu23-May-16 3:07
manoharbalu23-May-16 3:07 
GeneralRe: How to send huge data via sockets in continuous intervals Pin
leon de boer23-May-16 5:41
leon de boer23-May-16 5:41 
GeneralRe: How to send huge data via sockets in continuous intervals Pin
manoharbalu24-May-16 1:57
manoharbalu24-May-16 1:57 
GeneralRe: How to send huge data via sockets in continuous intervals Pin
leon de boer24-May-16 4:01
leon de boer24-May-16 4:01 
GeneralRe: How to send huge data via sockets in continuous intervals Pin
manoharbalu24-May-16 20:44
manoharbalu24-May-16 20:44 
GeneralRe: How to send huge data via sockets in continuous intervals Pin
leon de boer25-May-16 22:08
leon de boer25-May-16 22:08 
SuggestionRe: How to send huge data via sockets in continuous intervals Pin
David Crow23-May-16 3:41
David Crow23-May-16 3:41 
AnswerRe: How to send huge data via sockets in continuous intervals Pin
Joe Woodbury25-May-16 6:42
professionalJoe Woodbury25-May-16 6:42 
QuestionInput multiple data types from a file into a linked list Pin
Farhan_Karim20-May-16 17:51
Farhan_Karim20-May-16 17:51 
AnswerRe: Input multiple data types from a file into a linked list Pin
Richard MacCutchan20-May-16 21:54
mveRichard MacCutchan20-May-16 21:54 
GeneralRe: Input multiple data types from a file into a linked list Pin
Farhan_Karim20-May-16 22:08
Farhan_Karim20-May-16 22:08 
GeneralRe: Input multiple data types from a file into a linked list Pin
Richard MacCutchan20-May-16 22:30
mveRichard MacCutchan20-May-16 22:30 
GeneralRe: Input multiple data types from a file into a linked list Pin
leon de boer22-May-16 4:00
leon de boer22-May-16 4:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.