no message
This commit is contained in:
@@ -192,12 +192,6 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
case Ping:
|
||||
Ping();
|
||||
break;
|
||||
case ReadFile:
|
||||
ReadFile();
|
||||
break;
|
||||
case SendFile:
|
||||
SendFile();
|
||||
break;
|
||||
case ReceiveFile:
|
||||
ReceiveFile();
|
||||
break;
|
||||
@@ -311,16 +305,10 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
};
|
||||
return pingPass.Do();
|
||||
}
|
||||
void ReadFile() throws Exception {
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK, "", Utils.ReadAllText(new File(request.arg)));
|
||||
}
|
||||
void ReceiveFile() throws Exception {
|
||||
File file = new File(request.arg);
|
||||
response.object = file.exists() ? Utils_.fileToBytes(file) : null;
|
||||
}
|
||||
void SendFile() throws Exception {
|
||||
request.Unpack(); //распаковка идет по его аргу-пути назначения
|
||||
}
|
||||
void Email() throws Exception {
|
||||
Email((EmailMessage) request.object, request.arg);
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@ public enum ServerCode {
|
||||
Undefined,
|
||||
TestCode,
|
||||
Ping,
|
||||
ReadFile,
|
||||
SendFile,
|
||||
ReceiveFile,
|
||||
//--
|
||||
CheckSubscriberRole,
|
||||
|
||||
Reference in New Issue
Block a user