 |
| C# 2005 For discussion of Visual C# 2005. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

July 3rd, 2008, 09:23 AM
|
|
Authorized User
|
|
Join Date: Aug 2007
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Send file(<1MB) through tcp connection
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!
|
|

July 3rd, 2008, 09:40 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
|
|
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 -/
|
|

July 3rd, 2008, 10:02 AM
|
|
Authorized User
|
|
Join Date: Aug 2007
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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!
|
|

July 3rd, 2008, 10:29 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
|
|
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/...-f17be4a12e33/
/- Sam Judson : Wrox Technical Editor -/
|
|

July 3rd, 2008, 10:48 AM
|
|
Authorized User
|
|
Join Date: Aug 2007
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
can this be done using window mobile?
Thank you!
|
|

July 3rd, 2008, 10:58 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
|
|
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 -/
|
|

July 3rd, 2008, 11:02 AM
|
|
Authorized User
|
|
Join Date: Aug 2007
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
thank you so much!
|
|
 |