Click here to Skip to main content
15,913,907 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to Systematic Development and Programming Pin
Pete O'Hanlon1-Jun-11 23:18
mvePete O'Hanlon1-Jun-11 23:18 
AnswerRe: How to Systematic Development and Programming Pin
PIEBALDconsult2-Jun-11 3:09
mvePIEBALDconsult2-Jun-11 3:09 
QuestionSaving as a PDF file in the data PrintDocument Pin
ismail201-Jun-11 20:55
ismail201-Jun-11 20:55 
AnswerRe: Saving as a PDF file in the data PrintDocument Pin
Pete O'Hanlon1-Jun-11 21:52
mvePete O'Hanlon1-Jun-11 21:52 
AnswerRe: Saving as a PDF file in the data PrintDocument Pin
Luc Pattyn2-Jun-11 0:27
sitebuilderLuc Pattyn2-Jun-11 0:27 
AnswerRe: Saving as a PDF file in the data PrintDocument Pin
Dalek Dave13-Jun-11 11:35
professionalDalek Dave13-Jun-11 11:35 
QuestionFrustration with Entity Framework 4.1 Pin
TheyCallMeMrJames1-Jun-11 18:09
TheyCallMeMrJames1-Jun-11 18:09 
QuestionA problem while transferring data over the NetworkStream Pin
SimpleData1-Jun-11 9:06
SimpleData1-Jun-11 9:06 
Hi,
I am trying to send a big file over a TCP connection using NetworkStream and TCPClient. Both the client and the server is written in C#.

There is no problem while transferring small files around the size of 300KB. My buffer size is 2KB and here is how the protocol works.

-Server requests the file.
-Client tells the server the size of the file, and then sends the first 2KB of it.
-The server asks for another chunk of the file -like, send 2KB data, starting from 42649-
-Client sends the chunk
-Server asks for more, and client sends it...
-When the end of file is reached, the client acknowledges the server that transfer is complete.

Without looking at the code, since it is too long to be posted here, can you see any possible problems that may be causing this problem? I even tried sleeping the thread while receiving and processing the incoming chunks of data.

Regards
AnswerRe: A problem while transferring data over the NetworkStream Pin
Richard Andrew x641-Jun-11 12:49
professionalRichard Andrew x641-Jun-11 12:49 
GeneralRe: A problem while transferring data over the NetworkStream Pin
SimpleData1-Jun-11 12:51
SimpleData1-Jun-11 12:51 
GeneralRe: A problem while transferring data over the NetworkStream Pin
Richard Andrew x641-Jun-11 12:53
professionalRichard Andrew x641-Jun-11 12:53 
GeneralRe: A problem while transferring data over the NetworkStream Pin
Richard Andrew x641-Jun-11 13:02
professionalRichard Andrew x641-Jun-11 13:02 
GeneralRe: A problem while transferring data over the NetworkStream Pin
SimpleData1-Jun-11 14:15
SimpleData1-Jun-11 14:15 
GeneralRe: A problem while transferring data over the NetworkStream Pin
Dave Kreskowiak1-Jun-11 14:10
mveDave Kreskowiak1-Jun-11 14:10 
GeneralRe: A problem while transferring data over the NetworkStream Pin
SimpleData1-Jun-11 14:12
SimpleData1-Jun-11 14:12 
GeneralRe: A problem while transferring data over the NetworkStream Pin
BobJanova1-Jun-11 23:11
BobJanova1-Jun-11 23:11 
GeneralRe: A problem while transferring data over the NetworkStream Pin
SimpleData2-Jun-11 0:51
SimpleData2-Jun-11 0:51 
GeneralRe: A problem while transferring data over the NetworkStream Pin
Dave Kreskowiak2-Jun-11 2:21
mveDave Kreskowiak2-Jun-11 2:21 
AnswerRe: A problem while transferring data over the NetworkStream Pin
jschell1-Jun-11 14:49
jschell1-Jun-11 14:49 
AnswerRe: A problem while transferring data over the NetworkStream Pin
Luc Pattyn1-Jun-11 14:58
sitebuilderLuc Pattyn1-Jun-11 14:58 
AnswerRe: A problem while transferring data over the NetworkStream Pin
BobJanova1-Jun-11 23:10
BobJanova1-Jun-11 23:10 
GeneralRe: A problem while transferring data over the NetworkStream Pin
SimpleData2-Jun-11 0:54
SimpleData2-Jun-11 0:54 
GeneralRe: A problem while transferring data over the NetworkStream Pin
jschell2-Jun-11 9:42
jschell2-Jun-11 9:42 
GeneralRe: A problem while transferring data over the NetworkStream Pin
SimpleData2-Jun-11 10:29
SimpleData2-Jun-11 10:29 
GeneralRe: A problem while transferring data over the NetworkStream Pin
jschell6-Jun-11 8:49
jschell6-Jun-11 8:49 

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.