mirror of
https://github.com/Linloir/Simple-TCP-Server.git
synced 2025-12-18 08:28:12 +08:00
Update API
- Send message now returns the message md5 to client in the body part
This commit is contained in:
parent
52c32c2e74
commit
436af5c21a
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author : Linloir
|
* @Author : Linloir
|
||||||
* @Date : 2022-10-08 20:52:48
|
* @Date : 2022-10-08 20:52:48
|
||||||
* @LastEditTime : 2022-10-14 11:29:03
|
* @LastEditTime : 2022-10-14 15:13:08
|
||||||
* @Description :
|
* @Description :
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -161,6 +161,9 @@ Future<TCPResponse> onSendMessage(TCPRequest request, Socket socket) async {
|
|||||||
return TCPResponse(
|
return TCPResponse(
|
||||||
type: ResponseType.fromRequestType(request.requestType),
|
type: ResponseType.fromRequestType(request.requestType),
|
||||||
status: ResponseStatus.ok,
|
status: ResponseStatus.ok,
|
||||||
|
body: {
|
||||||
|
'md5encoded': message.md5encoded
|
||||||
|
}
|
||||||
);
|
);
|
||||||
} on Exception catch (exception) {
|
} on Exception catch (exception) {
|
||||||
return TCPResponse(
|
return TCPResponse(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user