Example #1
0
 /// 關閉 rc 連線物件.
 /// 在返回前, 仍然可能在其他 thread 收到事件.
 /// isWait = true 表示要等確定銷毀後才返回.
 /// isWait = false 表示在返回後仍可能收到事件, 如果您是在事件通知時呼叫, 則不能等候銷毀(會造成死結).
 public void Close(bool isWait)
 {
     unsafe
     {
         RcClientSession *ses = this.RcSes_;
         if (ses == null)
         {
             return;
         }
         this.RcSes_    = null;
         ses->UserData_ = IntPtr.Zero;
         this.UDHandle_.Free();
         DestroyClientSession(ses, isWait ? 1 : 0);
     }
 }
Example #2
0
 unsafe static extern void DestroyClientSession(RcClientSession *ses, int isWait);
Example #3
0
 unsafe static extern int CreateClientSession(out RcClientSession *result, ClientSessionParamsC args);