Example #1
0
 public override void ConnectionOpened(RtmpConnection connection)
 {
     try {
         // Send "connect" call to the server
         RtmpChannel channel     = connection.GetChannel(3);
         PendingCall pendingCall = new PendingCall("connect", _connectArguments);
         Invoke      invoke      = new Invoke(pendingCall);
         invoke.ConnectionParameters = _connectionParameters;
         invoke.InvokeId             = connection.InvokeId;
         pendingCall.RegisterCallback(this);
         connection.RegisterPendingCall(invoke.InvokeId, pendingCall);
         channel.Write(invoke);
     } catch (Exception ex) {
         _netConnection.RaiseNetStatus(ex);
     }
 }
Example #2
0
 public override void ConnectionOpened(RtmpConnection connection)
 {
     try
     {
         RtmpChannel channel     = connection.GetChannel(3);
         PendingCall serviceCall = new PendingCall("connect", this._connectArguments);
         FluorineFx.Messaging.Rtmp.Event.Invoke message = new FluorineFx.Messaging.Rtmp.Event.Invoke(serviceCall)
         {
             ConnectionParameters = this._connectionParameters,
             InvokeId             = connection.InvokeId
         };
         serviceCall.RegisterCallback(this);
         connection.RegisterPendingCall(message.InvokeId, serviceCall);
         channel.Write(message);
     }
     catch (Exception exception)
     {
         this._netConnection.RaiseNetStatus(exception);
     }
 }