示例#1
0
 public DSIException(int ErrorCode, DSIPack Res)
     : base(GetErrorDescription((ResultCode)ErrorCode)) {
     this.ErrorCode = ErrorCode;
     this.Res = Res;
 }
示例#2
0
        void Receiver() {
            Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture;
            try {
                while (true) {
                    DSIPack res = new DSIPack(st);
                    if (res.Command == 5) // DSITickle
                        continue;
                    ServerDS sv = GetServerDS(res.RequestID);
                    if (sv == null)
                        continue;
                    sv.dsiRes = res;
                    sv.evRecv.Set();
                }
            }
            catch (Exception err) {
                if (!evExit.WaitOne(0, false)) {
                    //Console.Error.WriteLine("# Receiverが故障しました: " + err.Message);
                }

                lock (servs) {
                    foreach (ServerDS serv in servs) {
                        serv.evRecv.Set();
                        serv.err = err;
                    }
                }

                if (Sock.Connected)
                    Sock.Shutdown(SocketShutdown.Both);
            }
        }
示例#3
0
 public DSIException(int ErrorCode)
     : base(GetErrorDescription((ResultCode)ErrorCode)) {
     this.ErrorCode = ErrorCode;
     this.Res = null;
 }
示例#4
0
 public TransmitRes(DSIPack pack) {
     this.pack = pack;
     this.br = new BER(new MemoryStream(pack.Payload, false));
 }