Click here to Skip to main content
16,020,249 members
Home / Discussions / C#
   

C#

 
AnswerRe: Paint a cell in DataGridView Pin
Judah Gabriel Himango6-Aug-06 11:38
sponsorJudah Gabriel Himango6-Aug-06 11:38 
GeneralRe: Paint a cell in DataGridView Pin
kalyanPaladugu6-Aug-06 13:06
kalyanPaladugu6-Aug-06 13:06 
GeneralRe: Paint a cell in DataGridView Pin
Judah Gabriel Himango6-Aug-06 15:56
sponsorJudah Gabriel Himango6-Aug-06 15:56 
GeneralRe: Paint a cell in DataGridView Pin
Erik Molenaar8-Aug-06 7:53
Erik Molenaar8-Aug-06 7:53 
QuestionSerialisation of more than one object Pin
Malcolm Smart6-Aug-06 10:00
Malcolm Smart6-Aug-06 10:00 
AnswerRe: Serialisation of more than one object Pin
Malcolm Smart6-Aug-06 10:39
Malcolm Smart6-Aug-06 10:39 
GeneralRe: Serialisation of more than one object Pin
HellfireHD6-Aug-06 11:32
HellfireHD6-Aug-06 11:32 
GeneralRe: Serialisation of more than one object Pin
Malcolm Smart6-Aug-06 20:58
Malcolm Smart6-Aug-06 20:58 
They are being sent from the client one at a time, varying length. The stream gets concatonated at teh server side whilst I am handling a previous read.

I sussed it out partially, as deserialise nicely moves the pointer in the memory stram to the start of the next object. My current issue is handling partial data. After calling BeginRecieve, EndReceive, my byte[] buffer sometimes has only half an object, the other half is still sitting in the stream waiting for the next BeginReceive call.

I tried to resolve this by holding a pointer to the start of the incomplete point in the stream, set the offset in the BeginRecieve to the end of the current stream and read, ensuring I get the rest of the data, but somewhere down the line my logic screws up as I miss shed loads of messages.

So...I sound like my wife, rambling on and on and on here....

I am changing it to do what you said, pass a 4 byte header which contains the length. On the asynch beginrecieve, specify 4 bytes as the size to read, then call a blocking read to read the rest, pass that off to another thread to handler the deserialise, and then start again, beginReceive for the next four byte size.

I know there are loads of client servers socket examples around on CP, but you can't learn better that rolling your own from scratch, and then seeing how others have done it.



Regards

Malc
*********************************************


Questionjava stringtokenizer in c# Pin
Legolas_Bilbao6-Aug-06 9:56
Legolas_Bilbao6-Aug-06 9:56 
AnswerRe: java stringtokenizer in c# Pin
Colin Angus Mackay6-Aug-06 10:07
Colin Angus Mackay6-Aug-06 10:07 
GeneralRe: java stringtokenizer in c# Pin
Judah Gabriel Himango6-Aug-06 11:37
sponsorJudah Gabriel Himango6-Aug-06 11:37 
GeneralRe: java stringtokenizer in c# Pin
Legolas_Bilbao6-Aug-06 20:01
Legolas_Bilbao6-Aug-06 20:01 
Questionclass library and windows application trouble. Pin
digitalangel6-Aug-06 8:20
digitalangel6-Aug-06 8:20 
AnswerRe: class library and windows application trouble. Pin
Judah Gabriel Himango6-Aug-06 9:30
sponsorJudah Gabriel Himango6-Aug-06 9:30 
QuestionDataTable and DataGridView in C# -- Please Help Pin
kalyanPaladugu6-Aug-06 7:24
kalyanPaladugu6-Aug-06 7:24 
AnswerRe: DataTable and DataGridView in C# -- Please Help Pin
Judah Gabriel Himango6-Aug-06 9:32
sponsorJudah Gabriel Himango6-Aug-06 9:32 
GeneralRe: DataTable and DataGridView in C# -- Please Help Pin
kalyanPaladugu6-Aug-06 9:42
kalyanPaladugu6-Aug-06 9:42 
GeneralRe: DataTable and DataGridView in C# -- Please Help Pin
Judah Gabriel Himango6-Aug-06 11:34
sponsorJudah Gabriel Himango6-Aug-06 11:34 
QuestionHow can I alignment text On PRINTING ? ? ? Pin
galigal156-Aug-06 6:45
galigal156-Aug-06 6:45 
AnswerRe: How can I alignment text On PRINTING ? ? ? Pin
Rob Graham6-Aug-06 7:15
Rob Graham6-Aug-06 7:15 
QuestionInheritance in C# Pin
gns106-Aug-06 6:10
gns106-Aug-06 6:10 
AnswerRe: Inheritance in C# Pin
Ravi Bhavnani6-Aug-06 6:19
professionalRavi Bhavnani6-Aug-06 6:19 
GeneralRe: Inheritance in C# Pin
gns107-Aug-06 0:27
gns107-Aug-06 0:27 
GeneralRe: Inheritance in C# Pin
Ravi Bhavnani7-Aug-06 1:44
professionalRavi Bhavnani7-Aug-06 1:44 
QuestionPrinter controller for Visual C#.NET 2003 Pin
orentuil6-Aug-06 5:52
orentuil6-Aug-06 5:52 

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.