diff --git a/Server/Service/Login.cs b/Server/Service/Login.cs index ed6fa2f..0845786 100644 --- a/Server/Service/Login.cs +++ b/Server/Service/Login.cs @@ -16,7 +16,9 @@ namespace Server.Service public override string Process() { - + //string uniqueSessionId = Guid.NewGuid().ToString(); 이러한 형태를 사용해 key값을 저장 + //서버에서 데이터를 받아 user의 데이터들을 redis에 저장 + //이러한 형태로 세션을 관리. User user; bool newUser = false; #region 로그인 diff --git a/Server/System/Redis.cs b/Server/System/Redis.cs index 21bf4ee..08f3672 100644 --- a/Server/System/Redis.cs +++ b/Server/System/Redis.cs @@ -193,7 +193,7 @@ namespace Server.System SetHash(item.Key, item.Value, keys); } - public Dictionary GetHash(params string[] keys) + public Dictionary GetAllHash(params string[] keys) { Dictionary hash = new Dictionary(); if (local) @@ -211,6 +211,17 @@ namespace Server.System return hash; } + public object GetHash(string field ,params string[] keys) + { + if (local) + { + Dictionary hashs = new Dictionary(hashType[KeySet(keys)]); + return hashs[field]; + } + else + return db.HashGet(KeySet(keys), field); + } + private string KeySet(string[] keys) { return string.Join(":", keys);