Click here to Skip to main content
15,911,039 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Programming problem Pin
Joe Woodbury19-Dec-02 5:45
professionalJoe Woodbury19-Dec-02 5:45 
GeneralRe: Programming problem Pin
Anonymous19-Dec-02 7:23
Anonymous19-Dec-02 7:23 
GeneralRe: Programming problem Pin
Joe Woodbury19-Dec-02 10:17
professionalJoe Woodbury19-Dec-02 10:17 
GeneralOpen file Pin
duvaft19-Dec-02 3:06
duvaft19-Dec-02 3:06 
GeneralRe: Open file Pin
Joe Woodbury19-Dec-02 5:20
professionalJoe Woodbury19-Dec-02 5:20 
GeneralCSocket multithreading[urgent] Pin
junni19-Dec-02 2:47
junni19-Dec-02 2:47 
GeneralRe: CSocket multithreading[urgent] Pin
Rage19-Dec-02 2:48
professionalRage19-Dec-02 2:48 
GeneralRe: CSocket multithreading[urgent] Pin
junni19-Dec-02 3:02
junni19-Dec-02 3:02 
CSocket* connect()
{
pClientSocket = new CSocket;

pClientSocket->Create();

bConnect = pClientSocket->Connect(
m_strServerIPAddress.c_str(),
m_iServerPort
);
}

if( ! bConnect )
{
CString strTmp;
strTmp.Format("Error: Failed to connect to server (%s).",m_strServerIPAddress.c_str());
AfxMessageBox(strTmp);
return FALSE;
}

return pClientSocket;
}

//then I did
CSocket m_pClientSocket;
m_pClientSocket=new CSocket;
m_pClientSocket = Connect();


//then I used the m_pClientSocket->Receive() func that worked
//now I created a secondary thread using beginthreadex()
//then I called the m_pClientSocket->Receive()func in the secondary thread func threadproc()in a while loop ..it seems that evrytime I call the Receive method it raises the Debug assertion failed exception ..if I ignore the error I continues to execute the receive func of CSocket but after quite some delay..

Is there ant way out of this problem...

Thanx and Regards
Junni


GeneralRe: CSocket multithreading[urgent] Pin
Daniel Turini19-Dec-02 3:03
Daniel Turini19-Dec-02 3:03 
GeneralRe: CSocket multithreading[urgent] Pin
Brian Delahunty19-Dec-02 3:53
Brian Delahunty19-Dec-02 3:53 
GeneralRe: CSocket multithreading[urgent] Pin
Nish Nishant19-Dec-02 6:28
sitebuilderNish Nishant19-Dec-02 6:28 
GeneralRe: CSocket multithreading[urgent] Pin
junni19-Dec-02 18:55
junni19-Dec-02 18:55 
GeneralRe: CSocket multithreading[urgent] Pin
RobJones19-Dec-02 9:32
RobJones19-Dec-02 9:32 
GeneralRe: CSocket multithreading[urgent] Pin
junni19-Dec-02 18:58
junni19-Dec-02 18:58 
GeneralWriting hex to a file Pin
Franz Klein19-Dec-02 2:28
Franz Klein19-Dec-02 2:28 
GeneralRe: Writing hex to a file Pin
David Chamberlain19-Dec-02 3:09
David Chamberlain19-Dec-02 3:09 
GeneralGetting Access to the Desktop Wallpaper Pin
Waleed Eissa19-Dec-02 2:23
Waleed Eissa19-Dec-02 2:23 
GeneralRe: Getting Access to the Desktop Wallpaper Pin
Kannan Kalyanaraman19-Dec-02 2:38
Kannan Kalyanaraman19-Dec-02 2:38 
GeneralStatic linked library with resources Pin
f.o.b19-Dec-02 2:20
f.o.b19-Dec-02 2:20 
GeneralRe: Static linked library with resources Pin
Pavel Klocek19-Dec-02 2:55
Pavel Klocek19-Dec-02 2:55 
GeneralRe: Static linked library with resources Pin
Ted Ferenc19-Dec-02 4:22
Ted Ferenc19-Dec-02 4:22 
GeneralRe: Static linked library with resources Pin
Fob19-Dec-02 5:11
Fob19-Dec-02 5:11 
GeneralRe: Static linked library with resources Pin
Fob19-Dec-02 5:22
Fob19-Dec-02 5:22 
Generaldynamic forms Pin
misiek19-Dec-02 2:16
misiek19-Dec-02 2:16 
GeneralRe: dynamic forms Pin
Pavel Klocek19-Dec-02 2:43
Pavel Klocek19-Dec-02 2:43 

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.