Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
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
 
Old July 3rd, 2008, 09:23 AM
Authorized User
 
Join Date: Aug 2007
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to yukijocelyn
Default 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!

 
Old July 3rd, 2008, 09:40 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

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 -/
 
Old July 3rd, 2008, 10:02 AM
Authorized User
 
Join Date: Aug 2007
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to yukijocelyn
Default

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!

 
Old July 3rd, 2008, 10:29 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

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 -/
 
Old July 3rd, 2008, 10:48 AM
Authorized User
 
Join Date: Aug 2007
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to yukijocelyn
Default

can this be done using window mobile?

Thank you!

 
Old July 3rd, 2008, 10:58 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

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 -/
 
Old July 3rd, 2008, 11:02 AM
Authorized User
 
Join Date: Aug 2007
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to yukijocelyn
Default

thank you so much!






Similar Threads
Thread Thread Starter Forum Replies Last Post
getting client ip in service using tcp connection RevengerPT .NET Web Services 5 March 31st, 2008 05:36 AM
send a file via TCP,UDP connection DAIKOSK Beginning VB 6 1 December 15th, 2007 02:08 PM
Cannot Upload file >1MB shweta_999 ASP.NET 2.0 Professional 1 December 19th, 2006 02:37 AM
TCP Send / Receive example Bodonn BOOK: Professional C#, 2nd and 3rd Editions 0 July 27th, 2006 04:55 PM
How to Send an Email =IF(D2<Today(), Chad_Honaker Excel VBA 0 June 7th, 2006 09:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.