Click here to Skip to main content
15,902,189 members
Home / Discussions / C#
   

C#

 
AnswerRe: interupting the loop with the button Pin
Not Active3-Aug-06 5:14
mentorNot Active3-Aug-06 5:14 
AnswerRe: interupting the loop with the button Pin
Stefan Troschuetz3-Aug-06 5:21
Stefan Troschuetz3-Aug-06 5:21 
GeneralRe: interupting the loop with the button Pin
Blubbo3-Aug-06 5:26
Blubbo3-Aug-06 5:26 
AnswerRe: interupting the loop with the button Pin
Nader Elshehabi3-Aug-06 5:31
Nader Elshehabi3-Aug-06 5:31 
QuestionAsynchronous socket question Pin
Madmaximus3-Aug-06 4:39
Madmaximus3-Aug-06 4:39 
AnswerRe: Asynchronous socket question Pin
Tim Kohler3-Aug-06 5:56
Tim Kohler3-Aug-06 5:56 
GeneralPrefix Pin
Ennis Ray Lynch, Jr.3-Aug-06 5:59
Ennis Ray Lynch, Jr.3-Aug-06 5:59 
AnswerRe: Asynchronous socket question Pin
RizwanSharp3-Aug-06 6:11
RizwanSharp3-Aug-06 6:11 
The more appealing and real world solution for all types of data transfer is to prefix each messaeg with its length.

Procedure is as follow.

Sending Part:

1) Calculate the Number of bytes produced by a message.
2) Store length as an integer value.
3) Convert the Length (integer) into bytes using BitConverter.GetBytes(messageLength) method.
4) Send these bytes on stream.
5) Send the original message.

Receiving Part:

1) Read 4 bytes from the stream Asynchronously.
2) Convert these bytes into integer value using BitConverter.ToInt32(buffer,0)
3) Now creat a Memory Stream and loop on it untill that message size is met.

Its the best technique in my knowledge and supports in Network delay situation for other type of data (Not String)

If you have further queries, feel free to conact me Wink | ;)
rizwansharp@hotmail.com

Best Regards,
Rizwan
QuestionImpersonation + Process.Start Pin
Gonzalo Brusella3-Aug-06 4:12
Gonzalo Brusella3-Aug-06 4:12 
AnswerRe: Impersonation + Process.Start Pin
Judah Gabriel Himango3-Aug-06 6:25
sponsorJudah Gabriel Himango3-Aug-06 6:25 
GeneralRe: Impersonation + Process.Start Pin
Judah Gabriel Himango3-Aug-06 6:37
sponsorJudah Gabriel Himango3-Aug-06 6:37 
GeneralRe: Impersonation + Process.Start Pin
Gonzalo Brusella3-Aug-06 7:05
Gonzalo Brusella3-Aug-06 7:05 
QuestionCombobox problem Pin
ZeinaBaG3-Aug-06 3:37
ZeinaBaG3-Aug-06 3:37 
AnswerRe: Combobox problem Pin
stancrm3-Aug-06 3:44
stancrm3-Aug-06 3:44 
Questionspeed up application Pin
V.3-Aug-06 3:19
professionalV.3-Aug-06 3:19 
AnswerRe: speed up application Pin
yueue3-Aug-06 3:27
yueue3-Aug-06 3:27 
GeneralRe: speed up application Pin
V.3-Aug-06 3:33
professionalV.3-Aug-06 3:33 
AnswerRe: speed up application Pin
WillemM3-Aug-06 3:29
WillemM3-Aug-06 3:29 
GeneralRe: speed up application Pin
V.3-Aug-06 3:33
professionalV.3-Aug-06 3:33 
GeneralRe: speed up application Pin
V.3-Aug-06 4:09
professionalV.3-Aug-06 4:09 
GeneralRe: speed up application Pin
Dave Kreskowiak3-Aug-06 5:31
mveDave Kreskowiak3-Aug-06 5:31 
GeneralRe: speed up application Pin
V.3-Aug-06 6:52
professionalV.3-Aug-06 6:52 
QuestionRe: speed up application Pin
RizwanSharp3-Aug-06 20:02
RizwanSharp3-Aug-06 20:02 
AnswerRe: speed up application Pin
Dave Kreskowiak4-Aug-06 2:02
mveDave Kreskowiak4-Aug-06 2:02 
QuestionRe: speed up application Pin
RizwanSharp4-Aug-06 2:34
RizwanSharp4-Aug-06 2:34 

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.