Click here to Skip to main content
14,738,115 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to convert a char array to CString? Pin
Cedric Moonen4-Feb-10 0:58
MemberCedric Moonen4-Feb-10 0:58 
GeneralRe: How to convert a char array to CString? Pin
CPallini4-Feb-10 1:02
mveCPallini4-Feb-10 1:02 
GeneralRe: How to convert a char array to CString? Pin
Code-o-mat4-Feb-10 1:33
MemberCode-o-mat4-Feb-10 1:33 
Questionsocket buffer problem Pin
trioum4-Feb-10 0:01
Membertrioum4-Feb-10 0:01 
AnswerRe: socket buffer problem Pin
CPallini4-Feb-10 0:46
mveCPallini4-Feb-10 0:46 
GeneralRe: socket buffer problem Pin
trioum4-Feb-10 1:23
Membertrioum4-Feb-10 1:23 
GeneralRe: socket buffer problem Pin
CPallini4-Feb-10 1:33
mveCPallini4-Feb-10 1:33 
AnswerRe: socket buffer problem Pin
Moak4-Feb-10 1:38
MemberMoak4-Feb-10 1: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 1:52
Membertrioum4-Feb-10 1:52 
GeneralRe: socket buffer problem Pin
Moak4-Feb-10 2:04
MemberMoak4-Feb-10 2:04 
GeneralRe: socket buffer problem Pin
Richard MacCutchan4-Feb-10 2:08
mveRichard MacCutchan4-Feb-10 2:08 
GeneralRe: socket buffer problem Pin
trioum4-Feb-10 2:16
Membertrioum4-Feb-10 2:16 
GeneralRe: socket buffer problem Pin
Richard MacCutchan4-Feb-10 2:53
mveRichard MacCutchan4-Feb-10 2:53 
GeneralRe: socket buffer problem Pin
Moak4-Feb-10 2:44
MemberMoak4-Feb-10 2:44 
GeneralRe: socket buffer problem Pin
trioum4-Feb-10 2:57
Membertrioum4-Feb-10 2:57 
GeneralRe: socket buffer problem Pin
Moak4-Feb-10 3:12
MemberMoak4-Feb-10 3:12 
GeneralRe: socket buffer problem Pin
trioum4-Feb-10 3:16
Membertrioum4-Feb-10 3:16 
GeneralRe: socket buffer problem Pin
Moak4-Feb-10 3:29
MemberMoak4-Feb-10 3:29 
GeneralRe: socket buffer problem Pin
trioum4-Feb-10 3:53
Membertrioum4-Feb-10 3:53 
GeneralRe: socket buffer problem Pin
Moak4-Feb-10 4:33
MemberMoak4-Feb-10 4:33 
AnswerRe: socket buffer problem Pin
fat_boy5-Feb-10 2:24
Memberfat_boy5-Feb-10 2:24 
GeneralRe: socket buffer problem Pin
trioum5-Feb-10 3:07
Membertrioum5-Feb-10 3:07 
GeneralRe: socket buffer problem Pin
fat_boy5-Feb-10 4:11
Memberfat_boy5-Feb-10 4:11 
GeneralRe: socket buffer problem Pin
trioum5-Feb-10 5:35
Membertrioum5-Feb-10 5:35 
GeneralRe: socket buffer problem Pin
fat_boy5-Feb-10 6:23
Memberfat_boy5-Feb-10 6: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.