Click here to Skip to main content
15,900,258 members
Home / Discussions / C#
   

C#

 
QuestionStatus Strip Progress bar graphics not accurate???!!! Pin
LongRange.Shooter18-Dec-08 6:50
LongRange.Shooter18-Dec-08 6:50 
AnswerRe: Status Strip Progress bar graphics not accurate???!!! Pin
led mike18-Dec-08 7:57
led mike18-Dec-08 7:57 
AnswerRe: Status Strip Progress bar graphics not accurate???!!! Pin
Dave Kreskowiak18-Dec-08 8:03
mveDave Kreskowiak18-Dec-08 8:03 
GeneralRe: Status Strip Progress bar graphics not accurate???!!! Pin
LongRange.Shooter19-Dec-08 3:37
LongRange.Shooter19-Dec-08 3:37 
GeneralRe: Status Strip Progress bar graphics not accurate???!!! Pin
Dave Kreskowiak19-Dec-08 12:06
mveDave Kreskowiak19-Dec-08 12:06 
AnswerRe: Status Strip Progress bar graphics not accurate???!!! Pin
Alan N18-Dec-08 8:07
Alan N18-Dec-08 8:07 
AnswerRe: Status Strip Progress bar graphics not accurate???!!! Pin
Tony Pottier18-Dec-08 8:48
Tony Pottier18-Dec-08 8:48 
QuestionSockets Best Practices Pin
menzelAtPCA18-Dec-08 6:43
menzelAtPCA18-Dec-08 6:43 
Assumptions:
1) Local Intranet - non-public traffic
2) A single 'server' application will accept ISerializable objects from up to 25 different clients.
3) Objects are not sent at predetermined times (IE not on a timer) but by user interaction

I'm trying to figure out the best way to send objects over TCP. Lets say these objects range from 355 bytes all the way up to 69500 bytes.

Because we're dealing with 25 different clients I'd like this all done asyncronously.

Now, there's 2 ways I can think to do this.
1)
Asyncronously accept a Header class with an (int)size and a System.Type variables using Socket.BeginReceive(). In testing, this header class is about 300-400 bytes. On receipt of this object, create a byte array of the size indicated in the Header object. Then do a blocking .Receive() for the actual object.
On the clients, I'd first send this Header object over, followed immediatly by the actual object.

2)
Ignore the header class, just send over the entire object. On the server, use a buffer to concat say 1024 bytes at a time until the object does not fail a try/catch DeSerialize method.

I've got both ways working, #2 seems messy, because I'm relying on try/catch clauses. However, I've tried neither on a larger roll out. Is there perhaps a better way of doing this?
AnswerRe: Sockets Best Practices Pin
led mike18-Dec-08 7:53
led mike18-Dec-08 7:53 
AnswerRe: Sockets Best Practices Pin
Ben Fair18-Dec-08 8:54
Ben Fair18-Dec-08 8:54 
Questionenter instead tab key Pin
ArielR18-Dec-08 6:25
ArielR18-Dec-08 6:25 
AnswerRe: enter instead tab key Pin
Giorgi Dalakishvili18-Dec-08 7:19
mentorGiorgi Dalakishvili18-Dec-08 7:19 
QuestionHow to add video in Visual Studio C# Pin
Sokka9318-Dec-08 5:59
Sokka9318-Dec-08 5:59 
AnswerRe: How to add video in Visual Studio C# Pin
Dave Kreskowiak18-Dec-08 8:28
mveDave Kreskowiak18-Dec-08 8:28 
QuestionKeeping data at the top of the command prompt Pin
SuperSken18-Dec-08 4:32
SuperSken18-Dec-08 4:32 
AnswerRe: Keeping data at the top of the command prompt Pin
Eddy Vluggen18-Dec-08 4:35
professionalEddy Vluggen18-Dec-08 4:35 
GeneralRe: Keeping data at the top of the command prompt Pin
SuperSken18-Dec-08 4:59
SuperSken18-Dec-08 4:59 
GeneralRe: Keeping data at the top of the command prompt Pin
Eddy Vluggen18-Dec-08 6:56
professionalEddy Vluggen18-Dec-08 6:56 
GeneralRe: Keeping data at the top of the command prompt Pin
Alan N18-Dec-08 7:13
Alan N18-Dec-08 7:13 
QuestionFuntion call Pin
hotthoughtguy18-Dec-08 4:05
hotthoughtguy18-Dec-08 4:05 
AnswerRe: Funtion call Pin
Simon P Stevens18-Dec-08 4:14
Simon P Stevens18-Dec-08 4:14 
AnswerRe: Funtion call Pin
Gideon Engelberth18-Dec-08 4:22
Gideon Engelberth18-Dec-08 4:22 
GeneralRe: Funtion call Pin
Luc Pattyn18-Dec-08 5:57
sitebuilderLuc Pattyn18-Dec-08 5:57 
GeneralRe: Funtion call Pin
hotthoughtguy18-Dec-08 6:21
hotthoughtguy18-Dec-08 6:21 
GeneralRe: Funtion call Pin
Luc Pattyn18-Dec-08 6:57
sitebuilderLuc Pattyn18-Dec-08 6:57 

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.