Ejemplo n.º 1
0
        public static bool DetermineSinkNode(List <TransactionTypeChannelFeeCombo> transactionTypeChannelFeeCombos)
        {
            foreach (var transactionTypeChannelFeeCombo in transactionTypeChannelFeeCombos)
            {
                if (curCombo.Equals(transactionTypeChannelFeeCombo.Combo))
                {
                    curSinkNode = transactionTypeChannelFeeCombo.SinkNode;
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 2
0
        public ClientPeer StartClient(SinkNode sinkNode)
        {
            ClientPeer clientPeer = new ClientPeer(sinkNode.Name, new TwoBytesNboHeaderChannel(
                                                       new Iso8583Ascii1987BinaryBitmapMessageFormatter(), sinkNode.IPAddress, Int32.Parse(sinkNode.Port)),
                                                   new Trx.Messaging.BasicMessagesIdentifier(11, 41));

            //clientPeer.Connect();

            clientPeer.RequestDone      += new PeerRequestDoneEventHandler(Client_RequestDone);
            clientPeer.RequestCancelled += new PeerRequestCancelledEventHandler(Client_RequestCancelled);

            clientPeer.Connected    += new PeerConnectedEventHandler(ClientPeerConnected);
            clientPeer.Receive      += new PeerReceiveEventHandler(ClientPeerOnReceive);
            clientPeer.Disconnected += new PeerDisconnectedEventHandler(ClientPeerDisconnected);

            return(clientPeer);
        }