添加对login的处理

This commit is contained in:
Kirigaya Kazuto 2017-03-08 21:27:36 +08:00
parent 7919d1d3e2
commit 482beb3df3

View File

@ -64,10 +64,27 @@ class Handle implements Runnable
int ret=BookFloatingServer.Register(reg.getEmail(), reg.getPass(), reg.getNickname(), reg.getSchool());
System.out.println("Register Finished. Ret("+ret+")");
pw.write("{'ret':'"+ret+"'}");
pw.flush();
}
break;
case "login":
break;
{
LoginData login=null;
try
{
login=gson.fromJson(str, LoginData.class);
}
catch(Exception e)
{
System.out.println("Incorrect Login Data");
break;
}
int ret=BookFloatingServer.Login(login.getEmail(),login.getPass());
pw.write("{'ret':'"+ret+"'}");
pw.flush();
}
break;
case "getpart":
break;
case "getfull":