Click here to Skip to main content
15,892,072 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Synchronous/Ascynchronous sockets Pin
led mike22-Jun-06 5:36
led mike22-Jun-06 5:36 
GeneralRe: Synchronous/Ascynchronous sockets Pin
Zac Howland22-Jun-06 6:13
Zac Howland22-Jun-06 6:13 
GeneralRe: Synchronous/Ascynchronous sockets Pin
led mike22-Jun-06 7:22
led mike22-Jun-06 7:22 
GeneralRe: Synchronous/Ascynchronous sockets Pin
Zac Howland22-Jun-06 7:24
Zac Howland22-Jun-06 7:24 
GeneralRe: Synchronous/Ascynchronous sockets Pin
CMas0722-Jun-06 5:58
CMas0722-Jun-06 5:58 
GeneralRe: Synchronous/Ascynchronous sockets Pin
Zac Howland22-Jun-06 6:18
Zac Howland22-Jun-06 6:18 
QuestionRe: Synchronous/Ascynchronous sockets Pin
CMas075-Jul-06 3:34
CMas075-Jul-06 3:34 
AnswerRe: Synchronous/Ascynchronous sockets Pin
Zac Howland5-Jul-06 4:44
Zac Howland5-Jul-06 4:44 
CMas07 wrote:
recvd= Client->Receive(recBuff, 512, 0);

//Again, prints the confirmation from the server for(int i = 0; i < recvd; i++)
cout << recBuff[i]; cout << endl;


You are not guaranteed to get your entire message at once here. Technically, you should do both send and recv calls in loops until they are completely sent/received.

Your connection is being reset because your server socket is going out of scope and closing itself. You should try to spawn a new thread and pass the AcceptSocket as a parameter to it to keep it alive.

If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac
GeneralRe: Synchronous/Ascynchronous sockets Pin
CMas075-Jul-06 5:02
CMas075-Jul-06 5:02 
GeneralRe: Synchronous/Ascynchronous sockets Pin
Zac Howland5-Jul-06 5:13
Zac Howland5-Jul-06 5:13 
AnswerRe: Synchronous/Ascynchronous sockets Pin
led mike22-Jun-06 5:34
led mike22-Jun-06 5:34 
GeneralRe: Synchronous/Ascynchronous sockets Pin
CMas0722-Jun-06 6:02
CMas0722-Jun-06 6:02 
Questionhow to open a *.txt file Pin
divisameer22-Jun-06 3:58
divisameer22-Jun-06 3:58 
AnswerRe: how to open a *.txt file Pin
toxcct22-Jun-06 3:59
toxcct22-Jun-06 3:59 
QuestionRe: how to open a *.txt file Pin
David Crow22-Jun-06 4:06
David Crow22-Jun-06 4:06 
AnswerRe: how to open a *.txt file Pin
Hamid_RT22-Jun-06 20:10
Hamid_RT22-Jun-06 20:10 
Questionvalues reading from a text document Pin
divisameer22-Jun-06 3:46
divisameer22-Jun-06 3:46 
AnswerRe: values reading from a text document Pin
_AnsHUMAN_ 22-Jun-06 3:50
_AnsHUMAN_ 22-Jun-06 3:50 
GeneralRe: values reading from a text document Pin
Cedric Moonen22-Jun-06 3:54
Cedric Moonen22-Jun-06 3:54 
GeneralRe: values reading from a text document Pin
toxcct22-Jun-06 3:58
toxcct22-Jun-06 3:58 
GeneralRe: values reading from a text document Pin
_AnsHUMAN_ 22-Jun-06 4:02
_AnsHUMAN_ 22-Jun-06 4:02 
AnswerRe: values reading from a text document Pin
Stephen Hewitt22-Jun-06 4:00
Stephen Hewitt22-Jun-06 4:00 
AnswerRe: values reading from a text document Pin
David Crow22-Jun-06 4:01
David Crow22-Jun-06 4:01 
AnswerRe: values reading from a text document Pin
Zac Howland22-Jun-06 4:11
Zac Howland22-Jun-06 4:11 
Questiondynamic radio button Pin
Tara1422-Jun-06 3:33
Tara1422-Jun-06 3:33 

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.