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

C / C++ / MFC

 
GeneralRe: How to convert a char array to CString? Pin
Cedric Moonen3-Feb-10 23:58
Cedric Moonen3-Feb-10 23:58 
GeneralRe: How to convert a char array to CString? Pin
CPallini4-Feb-10 0:02
mveCPallini4-Feb-10 0:02 
GeneralRe: How to convert a char array to CString? Pin
Code-o-mat4-Feb-10 0:33
Code-o-mat4-Feb-10 0:33 
Questionsocket buffer problem Pin
trioum3-Feb-10 23:01
trioum3-Feb-10 23:01 
AnswerRe: socket buffer problem Pin
CPallini3-Feb-10 23:46
mveCPallini3-Feb-10 23:46 
GeneralRe: socket buffer problem Pin
trioum4-Feb-10 0:23
trioum4-Feb-10 0:23 
GeneralRe: socket buffer problem Pin
CPallini4-Feb-10 0:33
mveCPallini4-Feb-10 0:33 
AnswerRe: socket buffer problem Pin
Moak4-Feb-10 0:38
Moak4-Feb-10 0:38 
I agree with CPallini, this is unlikely to be related to an internal buffer. We would need more detailed information to help you with your problem, here are some suggestions to look at:

1) Check in the server code that you are actually sending complete data package to every client, e.g. by comparing that the return value from send() is equal to the number of bytes and that there were no errors. A server should be able to handle a couple of thousand clients, make sure you are not running into a OS specific upper limit.
2) Check in the client code that you are actually connected to the server and debug received data, e.g. print out the number of received bytes from recv(). TCP is a stream oriented protocol, which means that when the server sends 100 bytes you might get 100 bytes or chunks of 2 times 50 bytes etc (this could confuse the receiving side).
3) If you are new to network programming it is always good to start with working examples. Have a look at Beej's guide to networking programming[^] and Winsock Programmer's FAQ[^], there are client/server examples in section 6.

Let me know if that helps Smile | :)

/M


GeneralRe: socket buffer problem Pin
trioum4-Feb-10 0:52
trioum4-Feb-10 0:52 
GeneralRe: socket buffer problem Pin
Moak4-Feb-10 1:04
Moak4-Feb-10 1:04 
GeneralRe: socket buffer problem Pin
Richard MacCutchan4-Feb-10 1:08
mveRichard MacCutchan4-Feb-10 1:08 
GeneralRe: socket buffer problem Pin
trioum4-Feb-10 1:16
trioum4-Feb-10 1:16 
GeneralRe: socket buffer problem Pin
Richard MacCutchan4-Feb-10 1:53
mveRichard MacCutchan4-Feb-10 1:53 
GeneralRe: socket buffer problem Pin
Moak4-Feb-10 1:44
Moak4-Feb-10 1:44 
GeneralRe: socket buffer problem Pin
trioum4-Feb-10 1:57
trioum4-Feb-10 1:57 
GeneralRe: socket buffer problem Pin
Moak4-Feb-10 2:12
Moak4-Feb-10 2:12 
GeneralRe: socket buffer problem Pin
trioum4-Feb-10 2:16
trioum4-Feb-10 2:16 
GeneralRe: socket buffer problem Pin
Moak4-Feb-10 2:29
Moak4-Feb-10 2:29 
GeneralRe: socket buffer problem Pin
trioum4-Feb-10 2:53
trioum4-Feb-10 2:53 
GeneralRe: socket buffer problem Pin
Moak4-Feb-10 3:33
Moak4-Feb-10 3:33 
AnswerRe: socket buffer problem Pin
fat_boy5-Feb-10 1:24
fat_boy5-Feb-10 1:24 
GeneralRe: socket buffer problem Pin
trioum5-Feb-10 2:07
trioum5-Feb-10 2:07 
GeneralRe: socket buffer problem Pin
fat_boy5-Feb-10 3:11
fat_boy5-Feb-10 3:11 
GeneralRe: socket buffer problem Pin
trioum5-Feb-10 4:35
trioum5-Feb-10 4:35 
GeneralRe: socket buffer problem Pin
fat_boy5-Feb-10 5:23
fat_boy5-Feb-10 5:23 

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.