p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning Visual C# 2005 (http://p2p.wrox.com/forumdisplay.php?f=222)
-   -   Chaper29, Exercise2 doesn't work (http://p2p.wrox.com/showthread.php?t=47072)

michaelqonly August 28th, 2006 03:04 PM

Chaper29, Exercise2 doesn't work
 
The source code for exercise 2 of Chaper29 networking can compile, however, couldn't run. Every time when I run it, the application is frozen.

Given error message for the code in server side:
do
                {
                    readBytes = clientStream.Read(buffer, 0, bufferSize);
                    memStream.Write(buffer, offset, readBytes);
                    offset += readBytes;
                } while (readBytes > 0);

The following is the error message:

Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.

If anyone knows how to fix it, please help.
Many thanks in advance.



All times are GMT -4. The time now is 09:48 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.