Click here to Skip to main content
15,912,897 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSHCreateDirectory() Pin
Monisankar23-Jan-05 20:01
Monisankar23-Jan-05 20:01 
GeneralRe: SHCreateDirectory() Pin
ThatsAlok23-Jan-05 20:09
ThatsAlok23-Jan-05 20:09 
GeneralRe: SHCreateDirectory() Pin
Michael Dunn23-Jan-05 20:52
sitebuilderMichael Dunn23-Jan-05 20:52 
Generalvariable duration/scope Pin
Galen_223-Jan-05 19:05
Galen_223-Jan-05 19:05 
GeneralRe: variable duration/scope Pin
toxcct23-Jan-05 22:11
toxcct23-Jan-05 22:11 
GeneralRe: variable duration/scope Pin
Galen_225-Jan-05 5:03
Galen_225-Jan-05 5:03 
GeneralRe: variable duration/scope Pin
Blake Miller25-Jan-05 5:30
Blake Miller25-Jan-05 5:30 
GeneralCSocket Receive Stucks Pin
anaknakal23-Jan-05 18:59
anaknakal23-Jan-05 18:59 
Hi everyone,

Using: VC++ .NET

My project involves sending a message from one computer to another.

I am using CSocket as the connection between these two computers. On the computer that receives the message, I am using the CSocket.Receive method to receive the incoming message. I have made it working, but somehow, I discover that when I call the Receive method on the receiving computer, the program 'hangs' (i.e. the form cannot move) until it actually receives the message. Is there in anyway helps to prevent this (the program does not 'hang', while still trying to receive a message)?

My client code goes something like this:

CSocket client;
client.Create();
client.Connect(ip,port); // ip and port have been specified before
client.Receive(&msgLength, 4); // i believe the program 'hangs' here until it gets something.
BYTE* msgByte = new BYTE[msgLength];

Thank you and your answer is greatly appreciated.


Generalclass type redifinition Pin
aj168223-Jan-05 18:51
aj168223-Jan-05 18:51 
GeneralRe: class type redifinition Pin
ThatsAlok23-Jan-05 19:03
ThatsAlok23-Jan-05 19:03 
GeneralRe: class type redifinition Pin
aj168223-Jan-05 19:39
aj168223-Jan-05 19:39 
GeneralRe: class type redifinition Pin
toxcct23-Jan-05 22:03
toxcct23-Jan-05 22:03 
GeneralHiding the splash window of the application Pin
ParagJhavery23-Jan-05 18:42
ParagJhavery23-Jan-05 18:42 
GeneralRe: Hiding the splash window of the application Pin
James R. Twine24-Jan-05 3:57
James R. Twine24-Jan-05 3:57 
QuestionHow to keep full screen Dialog, when Dialog is inherited from CDialogBar class? Pin
deepali p23-Jan-05 18:06
sussdeepali p23-Jan-05 18:06 
AnswerRe: How to keep full screen Dialog, when Dialog is inherited from CDialogBar class? Pin
ThatsAlok23-Jan-05 18:38
ThatsAlok23-Jan-05 18:38 
Generalnetwork serial port emulation Pin
vc-programmer-23-Jan-05 17:51
vc-programmer-23-Jan-05 17:51 
Generalplease help me. Pin
dSolariuM23-Jan-05 17:47
dSolariuM23-Jan-05 17:47 
GeneralRe: please help me. Pin
toxcct23-Jan-05 22:07
toxcct23-Jan-05 22:07 
GeneralRe: please help me. Pin
David Crow24-Jan-05 2:57
David Crow24-Jan-05 2:57 
QuestionHow to find if a machine is having internet connection. Pin
RuchirD23-Jan-05 16:50
RuchirD23-Jan-05 16:50 
AnswerRe: How to find if a machine is having internet connection. Pin
ThatsAlok23-Jan-05 17:45
ThatsAlok23-Jan-05 17:45 
GeneralRe: How to find if a machine is having internet connection. Pin
Ryan Binns23-Jan-05 17:51
Ryan Binns23-Jan-05 17:51 
GeneralRe: How to find if a machine is having internet connection. Pin
ThatsAlok23-Jan-05 18:29
ThatsAlok23-Jan-05 18:29 
GeneralRe: How to find if a machine is having internet connection. Pin
RuchirD23-Jan-05 18:37
RuchirD23-Jan-05 18:37 

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.