Exemplo n.º 1
0
        private enumErrorCode SendScheduleHandler(int machineId, byte[] buff, int userId, string infoType)
        {
            string strUserKey = string.Format("{0}-{1}", userId, DateTime.Now.ToString("yyyyMMddHHmmssFFF"));

            client.EnqueueItemOnList(PAGE_SEND_CONTENT, strUserKey);
            client.Set <int>(PRE_DOWN_INFO_MACHINE + strUserKey, machineId);
            client.Set(PRE_DOWN_INFO + strUserKey, buff);
            client.Set <string>(infoType + machineId.ToString(), strUserKey);

            enumErrorCode result = App_Start.TcpProtocolClient.WaittingSendForResp(strUserKey);

            client.Remove(PRE_DOWN_INFO_MACHINE + strUserKey);
            client.Remove(PRE_DOWN_INFO + strUserKey);
            client.Remove(infoType + machineId.ToString());

            return(result);
        }