Click here to Skip to main content
15,905,558 members
Home / Discussions / C#
   

C#

 
GeneralRe: Can not deserialize Pin
Luc Pattyn1-Dec-10 16:46
sitebuilderLuc Pattyn1-Dec-10 16:46 
GeneralRe: Can not deserialize [modified] Pin
Jacob D Dixon1-Dec-10 17:11
Jacob D Dixon1-Dec-10 17:11 
GeneralRe: Can not deserialize Pin
Luc Pattyn1-Dec-10 22:22
sitebuilderLuc Pattyn1-Dec-10 22:22 
GeneralRe: Can not deserialize Pin
Jacob D Dixon2-Dec-10 4:57
Jacob D Dixon2-Dec-10 4:57 
AnswerRe: Can not deserialize Pin
Luc Pattyn2-Dec-10 5:19
sitebuilderLuc Pattyn2-Dec-10 5:19 
GeneralRe: Can not deserialize Pin
Jacob D Dixon2-Dec-10 6:09
Jacob D Dixon2-Dec-10 6:09 
GeneralRe: Can not deserialize Pin
Luc Pattyn2-Dec-10 6:30
sitebuilderLuc Pattyn2-Dec-10 6:30 
GeneralRe: Can not deserialize Pin
Jacob D Dixon2-Dec-10 7:56
Jacob D Dixon2-Dec-10 7:56 
Ah yeah I got it now. Luc I just want to thank you for your help. Here is what I have now and it seems to be working well:

int bytesRead = handler.EndReceive(iar);
                if (bytesRead > 0)
                {
                    if (state.Length == 0)
                    {
                        state.Length = BitConverter.ToInt32(state.buffer, 0);

                        Logging.Log(handler.RemoteEndPoint.ToString() + " is about to send " + state.Length.ToString() + " bytes", true);
                        handler.BeginReceive(state.buffer, 0, StateObject.BufferSize, 0,
                            new AsyncCallback(ReadCallback), state);
                    }
                    else
                    {
                        state.Length -= bytesRead;
                        state.ms.Write(state.buffer, 0, bytesRead);

                        if (state.Length > 0)
                            handler.BeginReceive(state.buffer, 0, StateObject.BufferSize, 0,
                                new AsyncCallback(ReadCallback), state);
                        else
                        {
                            Logging.Log("Finished receiving " + state.ms.Length.ToString() + " bytes from " +
                                            handler.RemoteEndPoint.ToString(), true);

                            state.ms.Seek(0, SeekOrigin.Begin);
                            IFormatter formatter = new BinaryFormatter();
                            object receivedObject = null;

                            try
                            {
                                receivedObject = formatter.Deserialize(state.ms);

GeneralRe: Can not deserialize Pin
Luc Pattyn2-Dec-10 8:20
sitebuilderLuc Pattyn2-Dec-10 8:20 
QuestionTrying to deal with the memory leak in the Flash Player Pin
jbradshaw1-Dec-10 6:09
jbradshaw1-Dec-10 6:09 
AnswerRe: Trying to deal with the memory leak in the Flash Player Pin
Luc Pattyn1-Dec-10 6:52
sitebuilderLuc Pattyn1-Dec-10 6:52 
GeneralRe: Trying to deal with the memory leak in the Flash Player Pin
jbradshaw1-Dec-10 7:27
jbradshaw1-Dec-10 7:27 
QuestionRe: Trying to deal with the memory leak in the Flash Player Pin
jbradshaw1-Dec-10 7:32
jbradshaw1-Dec-10 7:32 
AnswerRe: Trying to deal with the memory leak in the Flash Player Pin
Luc Pattyn1-Dec-10 7:42
sitebuilderLuc Pattyn1-Dec-10 7:42 
GeneralRe: Trying to deal with the memory leak in the Flash Player Pin
Pete O'Hanlon1-Dec-10 9:39
mvePete O'Hanlon1-Dec-10 9:39 
GeneralRe: Trying to deal with the memory leak in the Flash Player Pin
Luc Pattyn1-Dec-10 10:09
sitebuilderLuc Pattyn1-Dec-10 10:09 
GeneralRe: Trying to deal with the memory leak in the Flash Player Pin
Pete O'Hanlon1-Dec-10 10:23
mvePete O'Hanlon1-Dec-10 10:23 
GeneralRe: Trying to deal with the memory leak in the Flash Player Pin
Luc Pattyn1-Dec-10 11:07
sitebuilderLuc Pattyn1-Dec-10 11:07 
GeneralRe: Trying to deal with the memory leak in the Flash Player Pin
DaveyM692-Dec-10 9:44
professionalDaveyM692-Dec-10 9:44 
AnswerRe: Trying to deal with the memory leak in the Flash Player Pin
Pete O'Hanlon1-Dec-10 9:12
mvePete O'Hanlon1-Dec-10 9:12 
AnswerRe: Trying to deal with the memory leak in the Flash Player Pin
Pete O'Hanlon1-Dec-10 22:47
mvePete O'Hanlon1-Dec-10 22:47 
GeneralRe: Trying to deal with the memory leak in the Flash Player Pin
jbradshaw2-Dec-10 2:42
jbradshaw2-Dec-10 2:42 
QuestionWeb Application Timeout Pin
MWRivera1-Dec-10 5:48
MWRivera1-Dec-10 5:48 
AnswerRe: Web Application Timeout Pin
T M Gray1-Dec-10 5:51
T M Gray1-Dec-10 5:51 
GeneralRe: Web Application Timeout Pin
MWRivera1-Dec-10 6:26
MWRivera1-Dec-10 6:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.