Ejemplo n.º 1
1
 public PackRawServerSide(Socket sock)
     : base(sock)
 {
     onMessageReadyToTx = new OnMessageReadyToTx(OnMsgRead4Tx);
     m_Id = sock.RemoteEndPoint;
     senderPackLib = new SenderPackLib.SenderPackLib(m_Id, onMessageReadyToTx);
 }
Ejemplo n.º 2
0
 public Stream2Message(OnMessageReadyToTx onMsgReadyToTx)
 {
     onMessageReadyToTx = onMsgReadyToTx;
     onTxMessageParam   = null;
     msgHandlers        = new OnMessageReceived[(int)PackMsg.PackMsg.MsgKind_e.PACK_MSG_NUMBER];
     InitRxStateMachine();
 }
Ejemplo n.º 3
0
 public Stream2Message(OnMessageReadyToTx onMsgReadyToTx)
 {
     onMessageReadyToTx = onMsgReadyToTx;
     onTxMessageParam = null;
     msgHandlers = new OnMessageReceived[(int)PackMsg.PackMsg.MsgKind_e.PACK_MSG_NUMBER];
     InitRxStateMachine();
 }
Ejemplo n.º 4
0
 public PackRawServerSide(Socket sock)
     : base(sock)
 {
     onMessageReadyToTx = new OnMessageReadyToTx(OnMsgRead4Tx);
     m_Id          = sock.RemoteEndPoint;
     senderPackLib = new SenderPackLib.SenderPackLib(m_Id, onMessageReadyToTx);
 }
Ejemplo n.º 5
0
        void InitiateTransfer()
        {
            OnMessageReadyToTx onMessageReadyToTx = new OnMessageReadyToTx(OnMsgRead4Tx);

            senderPackLib = new SenderPackLib.SenderPackLib(fileBuff, onMessageReadyToTx);
            AddMoreBytes();
        }
Ejemplo n.º 6
0
 public PackClientSide(Socket clientSocket, IPEndPoint remoteEndPoint)
     : base(clientSocket, remoteEndPoint)
 {
     m_onData = new OnData(OnDataReceived);
     m_onMsgRead4Tx = new OnMessageReadyToTx(OnMsgRead4Tx);
     m_onEnd = new OnEnd(OnTransationEnd);
     m_receiverPackLib = new ReceiverPackLib.ReceiverPackLib(m_Id,m_onData, m_onEnd, null, m_onMsgRead4Tx);
 }
Ejemplo n.º 7
0
 public PackClientSide(Socket clientSocket, IPEndPoint remoteEndPoint)
     : base(clientSocket, remoteEndPoint)
 {
     m_onData          = new OnData(OnDataReceived);
     m_onMsgRead4Tx    = new OnMessageReadyToTx(OnMsgRead4Tx);
     m_onEnd           = new OnEnd(OnTransationEnd);
     m_receiverPackLib = new ReceiverPackLib.ReceiverPackLib(m_Id, m_onData, m_onEnd, null, m_onMsgRead4Tx);
 }
Ejemplo n.º 8
0
 public SenderPackLib(EndPoint id, OnMessageReadyToTx onMsgReadyToTx)
     : base(onMsgReadyToTx)
 {
     m_Id = id;
     ChunkChainDataTypes.OnMessageReceived onPredMsg = new ChunkChainDataTypes.OnMessageReceived(ProcessPredMsg);
     base.SetCallback((int)PackMsg.PackMsg.MsgKind_e.PACK_PRED_MSG_KIND, onPredMsg);
     InitInstance(null);
 }
Ejemplo n.º 9
0
        private void Form1_Load(object sender, EventArgs e)
        {
            FileName = "";
            StopFlag = false;
            OnData             onData       = new OnData(OnDataReceived);
            OnMessageReadyToTx onMsgRead4Tx = new OnMessageReadyToTx(OnMsgRead4Tx);
            OnEnd onEnd = new OnEnd(OnTransationEnd);

            try
            {
                receiverPackLib = new ReceiverPackLib.ReceiverPackLib(onData, onEnd, null, onMsgRead4Tx);
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message, "Fatal");
            }
            updateStatus   = new UpdateStatus(Update_Status);
            updateControls = new UpdateControls(Update_Controls);
            Disposed      += new EventHandler(Form1_Disposed);
        }
Ejemplo n.º 10
0
        public ReceiverPackLib(EndPoint id, ChunkChainDataTypes.OnData onData, OnEnd onEnd, object onEndParam, OnMessageReadyToTx onMsgReadyToTx)
            : base(onMsgReadyToTx)
        {
            m_Id = id;
            OnMessageReceived onDataMsg    = new OnMessageReceived(ProcessDataMsg);
            OnMessageReceived onPredAckMsg = new OnMessageReceived(ProcessPredAckMsg);

            base.SetCallback((int)PackMsg.PackMsg.MsgKind_e.PACK_DATA_MSG_KIND, onDataMsg);
            base.SetCallback((int)PackMsg.PackMsg.MsgKind_e.PACK_FINALLY_PROCESSED_DATA_MSG_KIND, onDataMsg);
            base.SetCallback((int)PackMsg.PackMsg.MsgKind_e.PACK_PRED_ACK_MSG_KIND, onPredAckMsg);
            InitInstance(onData, onEnd, onEndParam);
        }
Ejemplo n.º 11
0
 public PackHttpServerSide(Socket sock)
     : base(sock)
 {
     m_onMessageReadyToTx = new OnMessageReadyToTx(OnMsgRead4Tx);
     m_senderPackLib      = new SenderPackLib.SenderPackLib(m_Id, m_onMessageReadyToTx);
 }
Ejemplo n.º 12
0
 public PackHttpServerSide(Socket sock)
     : base(sock)
 {
     m_onMessageReadyToTx = new OnMessageReadyToTx(OnMsgRead4Tx);
     m_senderPackLib = new SenderPackLib.SenderPackLib(m_Id,m_onMessageReadyToTx);
 }
Ejemplo n.º 13
0
 void InitiateTransfer()
 {
     OnMessageReadyToTx onMessageReadyToTx = new OnMessageReadyToTx(OnMsgRead4Tx);
     senderPackLib = new SenderPackLib.SenderPackLib(fileBuff, onMessageReadyToTx);
     AddMoreBytes();
 }