Esempio n. 1
0
        public DataConnection(ClientHost senderclient, ClientHost receiverclient)
        {
            try
            {
                this.state = State.NoInit;

                this.SenderClient   = senderclient;
                this.ReceiverClient = receiverclient;
                this.state          = State.AllRight;
            }
            catch (Exception ex)
            {
                Errorlog.Print(ex, this);
                this.state = State.Error;
            }
        }
Esempio n. 2
0
        public DataConnection(int SenderID, int ReceiverID, List <ClientHost> listclienthost)
        {
            try
            {
                this.state      = State.NoInit;
                this.SenderID   = SenderID;
                this.ReceiverID = ReceiverID;

                this.SenderClient   = listclienthost[SenderID];
                this.ReceiverClient = listclienthost[ReceiverID];
                this.state          = State.AllRight;
            }
            catch (Exception ex)
            {
                Errorlog.Print(ex, this);
                this.state = State.Error;
            }
        }
Esempio n. 3
0
 private bool IsSenderByServer(ClientHost obj)
 {
     return(this.ReceiveData.connection.SenderID == obj.clientstatus.ServerPort);
 }