public void DeliverEnd() { mBlinkConn = null; if (mListener != null) { mListener.OnSendEnd(IsSucceed()); } }
public void Cancel() { mCanceled = true; if (mBlinkConn != null) { mBlinkConn.Cancel(this); mBlinkConn = null; } }
/// <summary> /// Cancel the packet to send /// If the packet on sending you can't cancel it /// But you can cancel sending notify callback /// </summary> public void Cancel() { mCanceled = true; if (mBlinkConn != null) { mBlinkConn.Cancel(this); mBlinkConn = null; } }
static void Main(string[] args) { BlinkLog.I("=========PRESS ENTER IP eg(127.0.0.1)=========="); string ip = Console.ReadLine(); IPAddress hostIp; if (!IPAddress.TryParse(ip, out hostIp)) { Console.ReadKey(); return; } try { mSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); mSocket.Connect(hostIp, 2626); mBlinkConn = Blink.NewConnection(mSocket, 1024 * 1024, "D:/", Guid.NewGuid().ToString(), 0.01f, null, null); } catch (Exception) { BlinkLog.I("LINK TO: " + hostIp + " ERROR."); Console.ReadKey(); return; } BlinkLog.I("=========PRESS ENTER 'E' TO EXIT=========="); SendWhlie(); if (mBlinkConn != null) mBlinkConn.Dispose(); if (mSocket != null) { mSocket.Dispose(); mSocket.Close(); } }
public SendPacket SetBlinkConn(BlinkConn blinkConn) { mBlinkConn = blinkConn; return(this); }
/// <summary> /// Set The BlinkConn to Cancel from queue /// </summary> /// <param name="blinkConn">BlinkConn</param> /// <returns>SendPacket</returns> public SendPacket SetBlinkConn(BlinkConn blinkConn) { mBlinkConn = blinkConn; return this; }
public ReceiveDispatcher(IReceiver receiver, IReceiveDelivery delivery, BlinkConn blinkConn) { mReceiver = receiver; mDelivery = delivery; mBlinkConn = blinkConn; }