Click here to Skip to main content
15,909,953 members
Home / Discussions / C#
   

C#

 
AnswerRe: convert pointer and adress to C#? Pin
Guffa11-Jan-09 17:15
Guffa11-Jan-09 17:15 
AnswerRe: convert pointer and adress to C#? Pin
dec8211-Jan-09 17:51
dec8211-Jan-09 17:51 
AnswerRe: convert pointer and adress to C#? Pin
Guffa11-Jan-09 19:37
Guffa11-Jan-09 19:37 
QuestionNHibernate .NET 3.0 support? Pin
devvvy11-Jan-09 14:05
devvvy11-Jan-09 14:05 
AnswerRe: NHibernate .NET 3.0 support? Pin
Eddy Vluggen11-Jan-09 21:09
professionalEddy Vluggen11-Jan-09 21:09 
QuestionNetworkStream.Write Pin
Eli Nurman11-Jan-09 11:53
Eli Nurman11-Jan-09 11:53 
AnswerRe: NetworkStream.Write [modified] Pin
Luc Pattyn11-Jan-09 12:48
sitebuilderLuc Pattyn11-Jan-09 12:48 
GeneralRe: NetworkStream.Write Pin
Ben Fair12-Jan-09 7:43
Ben Fair12-Jan-09 7:43 
To expand on Luc's excellent information, the opposite is also true of the data being spread across multiple packets. If multiple pieces of data are sent that are small, depending on how the OS decides to use it's internal buffers, it may combine one of more and send them as 1 packet.

So, you can see that you have to have some way to sort it out on the receiving end since it may be received completely differently than how it was sent.

One approach is to create your own mechanism, or protocol, for transmitting data. A common technique is to perform 2 transmissions, the first is a small amount of data that contains the size of the data to be sent (can be just 4 bytes representing an Int32). And then the second transmission is the actual data. So, on the client end the first transmission would tell the client to expect N bytes of data. Then the client can read until all N bytes are received.

Keep It Simple Stupid! (KISS)

QuestionObject type not known at Design TIme Pin
CodingYoshi11-Jan-09 10:00
CodingYoshi11-Jan-09 10:00 
AnswerRe: Object type not known at Design TIme Pin
User 665811-Jan-09 10:46
User 665811-Jan-09 10:46 
AnswerRe: Object type not known at Design TIme Pin
Not Active11-Jan-09 12:31
mentorNot Active11-Jan-09 12:31 
GeneralRe: Object type not known at Design TIme Pin
CodingYoshi11-Jan-09 12:38
CodingYoshi11-Jan-09 12:38 
GeneralRe: Object type not known at Design TIme Pin
Guffa11-Jan-09 20:05
Guffa11-Jan-09 20:05 
AnswerRe: Object type not known at Design TIme Pin
Guffa11-Jan-09 20:02
Guffa11-Jan-09 20:02 
QuestionHow do I write to this class? [modified] Pin
e40s11-Jan-09 8:17
e40s11-Jan-09 8:17 
AnswerRe: How do I write to this class? Pin
Not Active11-Jan-09 8:28
mentorNot Active11-Jan-09 8:28 
GeneralRe: How do I write to this class? [modified] Pin
e40s11-Jan-09 9:17
e40s11-Jan-09 9:17 
GeneralRe: How do I write to this class? Pin
Not Active11-Jan-09 9:32
mentorNot Active11-Jan-09 9:32 
GeneralRe: How do I write to this class? [modified] Pin
e40s11-Jan-09 10:02
e40s11-Jan-09 10:02 
GeneralRe: How do I write to this class? Pin
Not Active11-Jan-09 12:20
mentorNot Active11-Jan-09 12:20 
GeneralRe: How do I write to this class? [modified] Pin
e40s11-Jan-09 16:16
e40s11-Jan-09 16:16 
GeneralRe: How do I write to this class? Pin
Not Active11-Jan-09 16:29
mentorNot Active11-Jan-09 16:29 
AnswerRe: How do I write to this class? [modified] Pin
Luc Pattyn11-Jan-09 16:54
sitebuilderLuc Pattyn11-Jan-09 16:54 
AnswerRe: How do I write to this class? Pin
Pete O'Hanlon11-Jan-09 8:43
mvePete O'Hanlon11-Jan-09 8:43 
GeneralRe: How do I write to this class? Pin
e40s11-Jan-09 9:23
e40s11-Jan-09 9: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.