예제 #1
0
 /// <summary>
 /// Receive a packet asynchronously
 /// </summary>
 /// <param name="packet">SNI packet</param>
 /// <returns>SNI error code</returns>
 public uint ReceiveAsync(ref SNIPacket packet)
 {
     lock (this)
     {
         return(_lowerHandle.ReceiveAsync(ref packet));
     }
 }
예제 #2
0
 /// <summary>
 /// Receive a packet asynchronously
 /// </summary>
 /// <param name="packet">SNI packet</param>
 /// <returns>True if completed synchronous, otherwise false</returns>
 public void ReceiveAsync(ref SNIPacket packet)
 {
     lock (this)
     {
         SNIError sniError;
         bool     completedSync = _lowerHandle.ReceiveAsync(true, ref packet, out sniError);
         Debug.Assert(!completedSync && (sniError == null), "Should not have completed sync");
     }
 }
예제 #3
0
 /// <summary>
 /// Receive a packet asynchronously
 /// </summary>
 /// <param name="packet">SNI packet</param>
 /// <returns>SNI error code</returns>
 public uint ReceiveAsync(ref SNIPacket packet)
 {
     if (packet != null)
     {
         packet.Release();
         packet = null;
     }
     lock (this)
     {
         return(_lowerHandle.ReceiveAsync(ref packet));
     }
 }
예제 #4
0
파일: SNIProxy.cs 프로젝트: schellap/corefx
        /// <summary>
        /// Read packet asynchronously
        /// </summary>
        /// <param name="handle">SNI handle</param>
        /// <param name="packet">Packet</param>
        /// <returns>SNI error status</returns>
        public uint ReadAsync(SNIHandle handle, ref SNIPacket packet)
        {
            packet = new SNIPacket(null);

            return(handle.ReceiveAsync(ref packet));
        }
예제 #5
0
파일: SNIProxy.cs 프로젝트: rajeevkb/corefx
        /// <summary>
        /// Read packet asynchronously
        /// </summary>
        /// <param name="handle">SNI handle</param>
        /// <param name="packet">Packet</param>
        /// <returns>SNI error status</returns>
        public uint ReadAsync(SNIHandle handle, ref SNIPacket packet)
        {
            packet = new SNIPacket(null);

            return handle.ReceiveAsync(ref packet);
        }
예제 #6
0
 /// <summary>
 /// Read packet asynchronously
 /// </summary>
 /// <param name="handle">SNI handle</param>
 /// <param name="packet">Packet</param>
 /// <returns>SNI error status</returns>
 public uint ReadAsync(SNIHandle handle, out SNIPacket packet)
 {
     packet = null;
     return(handle.ReceiveAsync(ref packet));
 }
예제 #7
0
        /// <summary>
        /// Read packet asynchronously
        /// </summary>
        /// <param name="handle">SNI handle</param>
        /// <param name="packet">Packet</param>
        /// <returns>SNI error status</returns>
        public uint ReadAsync(SNIHandle handle, out SNIPacket packet, bool isMars = false)
        {
            packet = new SNIPacket(null);

            return(handle.ReceiveAsync(ref packet));
        }