|
Subject:
|
Send file(<1MB) through tcp connection
|
|
Posted By:
|
yukijocelyn
|
Post Date:
|
7/3/2008 9:23:03 AM
|
I need help in trying to send a file fo size, around 1MB, through a TCP connection. Does any of you have any recommendations sites?
Thank you!
|
|
Reply By:
|
samjudson
|
Reply Date:
|
7/3/2008 9:40:16 AM
|
Are you asking how to create a TCP Connection, or are you having issues with file sizes?
The TcpClient class is there to help you create TCP Connections. If you are having a particular issue with this class then please be more specific.
/- Sam Judson : Wrox Technical Editor -/
|
|
Reply By:
|
yukijocelyn
|
Reply Date:
|
7/3/2008 10:02:30 AM
|
Thanks for the fast reply.
My TCP connection is already done. However, I have trouble sending a file over the TCP connection. Do you have a guide on how i can accomplish this?
Thank you so much!
|
|
Reply By:
|
samjudson
|
Reply Date:
|
7/3/2008 10:29:17 AM
|
I usually just open a FileStream, get the TcpClient's NetworkStream, and transfer the bytes a batch at a time.
e.g.:
http://forums.msdn.microsoft.com/en/netfxnetcom/thread/15aea284-7295-41ad-be98-f17be4a12e33/
/- Sam Judson : Wrox Technical Editor -/
|
|
Reply By:
|
yukijocelyn
|
Reply Date:
|
7/3/2008 10:48:30 AM
|
can this be done using window mobile?
Thank you!
|
|
Reply By:
|
samjudson
|
Reply Date:
|
7/3/2008 10:58:59 AM
|
I don't know, as I don't use the .Net Compact Framework, but I've very sure if you read the MSDN entry it will tell you explicitly if it is included in the Compact Framework.
/- Sam Judson : Wrox Technical Editor -/
|
|
Reply By:
|
yukijocelyn
|
Reply Date:
|
7/3/2008 11:02:57 AM
|
thank you so much!
|