private void BeginRequestFlashCall(IAsyncResult ar)
        {
            try {
                AmfRequestData amfRequestData = ar.AsyncState as AmfRequestData;
                if (amfRequestData != null)
                {
                    Stream        requestStream = amfRequestData.Request.EndGetRequestStream(ar);
                    AMFSerializer amfSerializer = new AMFSerializer(requestStream);
                    amfSerializer.WriteMessage(amfRequestData.AmfMessage);
                    amfSerializer.Flush();
                    amfSerializer.Close();

                    amfRequestData.Request.BeginGetResponse(BeginResponseFlashCall, amfRequestData);
                }
            } catch (Exception ex) {
                _netConnection.RaiseNetStatus(ex);
            }
        }
Exemple #2
0
 private void BeginRequestFlexCall(IAsyncResult ar)
 {
     try
     {
         RequestData asyncState = ar.AsyncState as RequestData;
         if (asyncState != null)
         {
             AMFSerializer serializer = new AMFSerializer(asyncState.Request.EndGetRequestStream(ar));
             serializer.WriteMessage(asyncState.AmfMessage);
             serializer.Flush();
             serializer.Close();
             asyncState.Request.BeginGetResponse(new AsyncCallback(this.BeginResponseFlexCall), asyncState);
         }
     }
     catch (Exception exception)
     {
         this._netConnection.RaiseNetStatus(exception);
     }
 }