Click here to Skip to main content
15,915,324 members
Home / Discussions / C#
   

C#

 
QuestionHandling mouse events in off-screen rendering Pin
HalliHaida20-Sep-10 23:04
HalliHaida20-Sep-10 23:04 
QuestionReading large data with TcpClient Pin
Chesnokov Yuriy20-Sep-10 20:47
professionalChesnokov Yuriy20-Sep-10 20:47 
AnswerRe: Reading large data with TcpClient Pin
Pete O'Hanlon20-Sep-10 22:25
mvePete O'Hanlon20-Sep-10 22:25 
AnswerRe: Reading large data with TcpClient Pin
Chesnokov Yuriy21-Sep-10 0:30
professionalChesnokov Yuriy21-Sep-10 0:30 
GeneralRe: Reading large data with TcpClient Pin
Pete O'Hanlon21-Sep-10 1:21
mvePete O'Hanlon21-Sep-10 1:21 
AnswerMessage Closed Pin
21-Sep-10 1:05
stancrm21-Sep-10 1:05 
GeneralRe: Reading large data with TcpClient Pin
Chesnokov Yuriy21-Sep-10 1:37
professionalChesnokov Yuriy21-Sep-10 1:37 
GeneralRe: Reading large data with TcpClient Pin
David Knechtges21-Sep-10 3:19
David Knechtges21-Sep-10 3:19 
In order to handle this situation correctly, you need a more sophisticated communications protocol between the server and client. In my case, from the server, I put an MD5 hash at the beginning of the message, along with a length, and then the message itself. When the receiver receives the message, it then calculates the MD5 hash on the received data. If they match, it then sends an ACK to the sender. If not, it sends a NACK and then the sender resends the message. The overall message itself can be as long as it needs to be.

You can define ACK and NACK however you want, I use the text ACK and NACK for mine, so if I want to look at the raw ethernet packets in ethereal or something like that, I can easily track what is happening.

I also do this for a UDP broadcast, except that there is no response from the clients. This ensures that the clients only act on known good messages from the server.

David
GeneralRe: Reading large data with TcpClient Pin
Chesnokov Yuriy21-Sep-10 3:51
professionalChesnokov Yuriy21-Sep-10 3:51 
GeneralRe: Reading large data with TcpClient Pin
Pete O'Hanlon21-Sep-10 4:44
mvePete O'Hanlon21-Sep-10 4:44 
QuestionRe: Reading large data with TcpClient Pin
Chesnokov Yuriy21-Sep-10 5:13
professionalChesnokov Yuriy21-Sep-10 5:13 
AnswerRe: Reading large data with TcpClient Pin
Pete O'Hanlon21-Sep-10 7:49
mvePete O'Hanlon21-Sep-10 7:49 
QuestionCorrect deserialization with BinaryFormatter Pin
Chesnokov Yuriy20-Sep-10 20:19
professionalChesnokov Yuriy20-Sep-10 20:19 
AnswerRe: Correct deserialization with BinaryFormatter Pin
Paw Jershauge21-Sep-10 0:35
Paw Jershauge21-Sep-10 0:35 
GeneralRe: Correct deserialization with BinaryFormatter Pin
Chesnokov Yuriy21-Sep-10 1:39
professionalChesnokov Yuriy21-Sep-10 1:39 
GeneralRe: Correct deserialization with BinaryFormatter Pin
Paw Jershauge21-Sep-10 2:18
Paw Jershauge21-Sep-10 2:18 
GeneralRe: Correct deserialization with BinaryFormatter Pin
Chesnokov Yuriy21-Sep-10 2:47
professionalChesnokov Yuriy21-Sep-10 2:47 
QuestionC# picture box Pin
C.CoderCreator20-Sep-10 20:05
C.CoderCreator20-Sep-10 20:05 
AnswerRe: C# picture box Pin
Pete O'Hanlon20-Sep-10 22:06
mvePete O'Hanlon20-Sep-10 22:06 
QuestionMicrosoft.Sharepoint.dll Reference. Pin
avi_dadi200220-Sep-10 20:00
avi_dadi200220-Sep-10 20:00 
AnswerRe: Microsoft.Sharepoint.dll Reference. Repost Pin
Richard MacCutchan20-Sep-10 21:19
mveRichard MacCutchan20-Sep-10 21:19 
Questionwhat gets passed to what class?? Pin
stephen.darling20-Sep-10 19:52
stephen.darling20-Sep-10 19:52 
AnswerMessage Closed Pin
20-Sep-10 21:09
stancrm20-Sep-10 21:09 
GeneralRe: what gets passed to what class?? Pin
stephen.darling20-Sep-10 21:29
stephen.darling20-Sep-10 21:29 
AnswerRe: what gets passed to what class?? Pin
OriginalGriff20-Sep-10 21:43
mveOriginalGriff20-Sep-10 21:43 

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.