Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

How can I know all data has been received?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ant Htoo Naing - 03 Mar 2006 07:43 GMT
Hi all,
I'm using Socket and to send some data (3Mb, 4MB, or more than that). I
convert data to byte array and use Send method and data is successfully sent.
From other side, I use Receive method. I put data in a file and when all data
has been received, I have to close the file. The poblem is I don't know when
all data has been received. I use Available property, but it gives 0 although
data is still coming. Now I'm using blocking socket. Do I need to use
Asynchronous socket? If so, how can I do? On internet, I see some example, it
send total number of bytes to send before the data is send. If I do like
that, the problem is ok. But I don't want to send "total bytes to send" to
other side. How can I solve this problem.
Thanks,
Ant.
InK_ - 03 Mar 2006 08:22 GMT
Hi

Look at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
conusingnon-blockingserversocket.asp

ManualResetEvent is used in above example.
I think that is what you need.

Signature

Regards,
Inna Stetsyak aka InK_

> Hi all,
> I'm using Socket and to send some data (3Mb, 4MB, or more than that). I
[quoted text clipped - 9 lines]
> Thanks,
> Ant.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.