mirror of
https://github.com/Linloir/Simple-TCP-Client.git
synced 2025-12-17 00:38:11 +08:00
Improvements
- add await during file recept
This commit is contained in:
parent
01568cfe9b
commit
2a6dc0d97f
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author : Linloir
|
||||
* @Date : 2022-10-13 14:03:56
|
||||
* @LastEditTime : 2022-10-18 17:09:55
|
||||
* @LastEditTime : 2022-10-19 00:37:31
|
||||
* @Description :
|
||||
*/
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author : Linloir
|
||||
* @Date : 2022-10-11 09:42:05
|
||||
* @LastEditTime : 2022-10-18 14:50:33
|
||||
* @LastEditTime : 2022-10-19 00:57:05
|
||||
* @Description : TCP repository
|
||||
*/
|
||||
|
||||
@ -29,6 +29,7 @@ class TCPRepository {
|
||||
try{
|
||||
await for(var response in _socket) {
|
||||
_pullResponse(response);
|
||||
await Future.delayed(const Duration(microseconds: 0));
|
||||
}
|
||||
} catch(e) {
|
||||
_socket.close();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user