no message

This commit is contained in:
2025-02-14 01:24:49 +03:00
parent 6d9bd4bc9b
commit 05b49a842e
2 changed files with 0 additions and 14 deletions

View File

@@ -192,12 +192,6 @@ public abstract class RepositoryServer<D extends Database> {
case Ping: case Ping:
Ping(); Ping();
break; break;
case ReadFile:
ReadFile();
break;
case SendFile:
SendFile();
break;
case ReceiveFile: case ReceiveFile:
ReceiveFile(); ReceiveFile();
break; break;
@@ -311,16 +305,10 @@ public abstract class RepositoryServer<D extends Database> {
}; };
return pingPass.Do(); return pingPass.Do();
} }
void ReadFile() throws Exception {
response = new ServerExchangeUnit_2021(ServerCode.OK, "", Utils.ReadAllText(new File(request.arg)));
}
void ReceiveFile() throws Exception { void ReceiveFile() throws Exception {
File file = new File(request.arg); File file = new File(request.arg);
response.object = file.exists() ? Utils_.fileToBytes(file) : null; response.object = file.exists() ? Utils_.fileToBytes(file) : null;
} }
void SendFile() throws Exception {
request.Unpack(); //распаковка идет по его аргу-пути назначения
}
void Email() throws Exception { void Email() throws Exception {
Email((EmailMessage) request.object, request.arg); Email((EmailMessage) request.object, request.arg);
} }

View File

@@ -3,8 +3,6 @@ public enum ServerCode {
Undefined, Undefined,
TestCode, TestCode,
Ping, Ping,
ReadFile,
SendFile,
ReceiveFile, ReceiveFile,
//-- //--
CheckSubscriberRole, CheckSubscriberRole,