...the program sends the data properly but is not waiting till the data comes back (recv()). and the thread terminates.
Please help me out.
void* TP_CALL(void* data)
{
int bytesSent;
int condition = 0;
int i=0;
memset(&sd, '\0', sizeof(sd))...
...After 5-10 minutes if i execute it works fine for 3-4 times and then again hangs and same story continues.
int StringUtil::fillData(int iPos,char* cTemp)
{
int iStrLen = m_str.length();
if (iStrLen > iPos)
{
m_str.replace(iPos, strlen(cTemp),cTemp)...
...m_str = src.m_str; //This gives problem
m_initialized = src.m_initialized;
return *this;
}
In the above mentioned function i am resizing m_str to src.m_str.length()+10 but still it gives problem (programs hangs at m_str = src.m_str;).
...not work at some places. When ever i say m_str="AA" then the length of string will become 2. What could be the problem. Is there is any solution for this problem. Why it is not able to add beyond 300 / 400 characters.
Thank you in advance.
Waiting for the reply.
With Regards,
Kathyayini.
*PP
I have written a program which will accept only 20 connections to the server port. If connection goes beyond 20 then below mentioned code will be executed which is in while loop
memset(cSendBuf,' ',23);
memset(&sd, '\0', 23);
printf("\nRejecting Excess Client %s...
I have written a program which will accept only 20 connections to the server port. If connection goes beyond 20 then below mentioned code will be executed which is in while loop
memset(cSendBuf,' ',23);
memset(&sd, '\0', 23);
printf("\nRejecting Excess Client %s...
I have structure called
struct senddata
{
int istatus;
char cstrmsg[50];
}sd;
char cSendBuf[100]; //char arr
I wants to copy the data of structure in to cSendBuf. i tried to copy but not successful. code is as follows
memset(&sd, '\0', sizeof(sd));
memset(cSendBuf...
...runs without any problem.
there is some problem in the way i am deploying context.
i have to use context because i am using multithreading.
//*****************************************************************************
Server Code :
void *RECEIVEBUFFER(void* data)
{
struct sqlca...
I am using socketing and multi threading. Problem is when i fire 4 request to the server, the recv function fails for 1 request (recv function returns zero). I used pthread_cond_wait function before recv function but still getting the same problem. Client is sending all 4 requests properly, but...
I have 10 global variables (the purpose of making it global is that all the variables are used in different functions). I am using multithreading and i do not want interaction between the threads. is there is a way to make threads to treat all global variables as local. what i mean to say is...
...know where i am going wrong.
THREADING PART IN MAIN PROGRAM :
while(1)
{
sock_id = accept(serverSocket,(struct sockaddr_in*)&sockAddr,&addrLen);
//printf("Keep Running is : %d\n",keep_running);
/* if(keep_running == 0)...
Im calling com dll through IIS (ASP invokes VC++ COM dll).
dll is used to send request to remote machine and waits for response and sends back to front end (ASP.) dll writes request and response logs in one text file.
when i had installed the application logs were generating properly but now its...
I am using SQLAllocHandle(),SQLConnect(),SQLFreeHandle() functions. When i compile the code it gives me the following error at the linking time.What could be the problem.
Linking...
testDlg.obj : error LNK2001: unresolved external symbol _SQLAllocHandle@12
Debug/test.exe : fatal error LNK1120: 1...
earlier i was using CTime but year must be with in 1970–2038 so i dropped the idea of using CTime and CTimeSpan. and difftime returns double-precision floating-point number.
but i want date/month/year difference.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.