mirror of
https://github.com/Linloir/Simple-TCP-Server.git
synced 2025-12-18 16:38:12 +08:00
Improvements:
- Shorten logs
This commit is contained in:
parent
5909308475
commit
325e518a17
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author : Linloir
|
* @Author : Linloir
|
||||||
* @Date : 2022-10-06 15:44:16
|
* @Date : 2022-10-06 15:44:16
|
||||||
* @LastEditTime : 2022-10-20 01:00:24
|
* @LastEditTime : 2022-10-20 10:47:50
|
||||||
* @Description :
|
* @Description :
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -45,7 +45,12 @@ void main(List<String> arguments) async {
|
|||||||
(request) async {
|
(request) async {
|
||||||
print('[L] [INCOMING ]-----------------------');
|
print('[L] [INCOMING ]-----------------------');
|
||||||
print('[L] Incoming from ${controller.socket.remoteAddress}:${controller.socket.remotePort}');
|
print('[L] Incoming from ${controller.socket.remoteAddress}:${controller.socket.remotePort}');
|
||||||
|
if(request.requestType == RequestType.sendMessage) {
|
||||||
|
print('[L] Message: (Message body)');
|
||||||
|
}
|
||||||
|
else {
|
||||||
print('[L] Message: ${request.toJSON}');
|
print('[L] Message: ${request.toJSON}');
|
||||||
|
}
|
||||||
if(!(await DataBaseHelper().isTokenValid(tokenid: request.tokenID))) {
|
if(!(await DataBaseHelper().isTokenValid(tokenid: request.tokenID))) {
|
||||||
if(controllerMap[controller] == null) {
|
if(controllerMap[controller] == null) {
|
||||||
controllerMap[controller] = (() async => (await DataBaseHelper().createToken()))();
|
controllerMap[controller] = (() async => (await DataBaseHelper().createToken()))();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user