Click here to Skip to main content
15,895,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: searching files Pin
ThatsAlok7-Apr-06 19:40
ThatsAlok7-Apr-06 19:40 
AnswerRe: searching files Pin
Hamid_RT7-Apr-06 19:45
Hamid_RT7-Apr-06 19:45 
AnswerRe: searching files Pin
Aqueel7-Apr-06 19:59
Aqueel7-Apr-06 19:59 
QuestionBalanced Binary Trees Pin
TranscendentalSoftware7-Apr-06 17:39
TranscendentalSoftware7-Apr-06 17:39 
AnswerRe: Balanced Binary Trees Pin
El Corazon7-Apr-06 20:09
El Corazon7-Apr-06 20:09 
GeneralRe: Balanced Binary Trees Pin
TranscendentalSoftware7-Apr-06 20:21
TranscendentalSoftware7-Apr-06 20:21 
GeneralRe: Balanced Binary Trees Pin
Blake Miller10-Apr-06 5:15
Blake Miller10-Apr-06 5:15 
QuestionCAsyncSocket Question Pin
JBAK_CP7-Apr-06 14:30
JBAK_CP7-Apr-06 14:30 
Hi I'm using a CAsyncSocket to create a TCP socket and connect to a server. Everytime I connect, the error code I get is a WSAEWOULDBLOCK, whether the server is there or not. So, the only way I know if I am connected or not is to send a message to the server, and I have to look to see if I have a send error of WSAENOTCONN to determine if my connection was a success or not. Is there any way, to know if I am really connected or not when I try to do a 'connect', instead of the approach that I'm taking right now?

Thank you,

//Code
m_pSock.Create(); //Create the socket
if (!m_pSock.Connect(IP, PORT))
{
DWORD error1 = GetLastError();
if(error1 == WSAEWOULDBLOCK)
{
iSent = m_pSock.Send((void *)messages[0],32);
if(iSent == SOCKET_ERROR)
{
DWORD error2 = GetLastError();
if(error2 == WSAENOTCONN )
{
MessageBox("SOCKET NOT CONNECTED",NULL,NULL);
}
}
}
}


-- modified at 20:30 Friday 7th April, 2006
AnswerRe: CAsyncSocket Question Pin
Mike O'Neill8-Apr-06 8:00
Mike O'Neill8-Apr-06 8:00 
QuestionHow to display series of numbers ? Pin
Surivevoli7-Apr-06 13:04
Surivevoli7-Apr-06 13:04 
AnswerRe: How to display series of numbers ? Pin
Ravi Bhavnani7-Apr-06 15:36
professionalRavi Bhavnani7-Apr-06 15:36 
GeneralRe: How to display series of numbers ? Pin
Surivevoli8-Apr-06 0:29
Surivevoli8-Apr-06 0:29 
GeneralRe: How to display series of numbers ? Pin
ThatsAlok8-Apr-06 1:25
ThatsAlok8-Apr-06 1:25 
GeneralRe: How to display series of numbers ? Pin
Ravi Bhavnani8-Apr-06 4:03
professionalRavi Bhavnani8-Apr-06 4:03 
AnswerRe: How to display series of numbers ? Pin
Hamid_RT7-Apr-06 18:42
Hamid_RT7-Apr-06 18:42 
GeneralRe: How to display series of numbers ? Pin
Surivevoli8-Apr-06 0:04
Surivevoli8-Apr-06 0:04 
GeneralRe: How to display series of numbers ? Pin
Hamid_RT8-Apr-06 1:13
Hamid_RT8-Apr-06 1:13 
GeneralRe: How to display series of numbers ? Pin
Hamid_RT8-Apr-06 1:35
Hamid_RT8-Apr-06 1:35 
GeneralRe: How to display series of numbers ? Pin
Surivevoli9-Apr-06 12:47
Surivevoli9-Apr-06 12:47 
GeneralRe: How to display series of numbers ? Pin
Hamid_RT9-Apr-06 18:45
Hamid_RT9-Apr-06 18:45 
AnswerRe: How to display series of numbers ? Pin
ThatsAlok7-Apr-06 23:42
ThatsAlok7-Apr-06 23:42 
GeneralRe: How to display series of numbers ? Pin
Surivevoli8-Apr-06 0:13
Surivevoli8-Apr-06 0:13 
QuestionFlicker draw nightmare Pin
Axonn Echysttas7-Apr-06 11:24
Axonn Echysttas7-Apr-06 11:24 
AnswerRe: Flicker draw nightmare Pin
Richard Andrew x647-Apr-06 13:33
professionalRichard Andrew x647-Apr-06 13:33 
AnswerRe: Flicker draw nightmare Pin
Ravi Bhavnani7-Apr-06 15:41
professionalRavi Bhavnani7-Apr-06 15:41 

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.