Replies: 4 comments 1 reply
-
I'm happy to contribute this change, if you are willing to accept it |
Beta Was this translation helpful? Give feedback.
-
Many thanks! I am cleaning and fixing old code right now, hope to make it available in a few days. Seems like the perfect spot to test your suggestion, and all help is most welcome! |
Beta Was this translation helpful? Give feedback.
-
Ok, got initial PR here, have a look when you can :) Thanks! |
Beta Was this translation helpful? Give feedback.
-
PR is working and ready! :) closing this discussion |
Beta Was this translation helpful? Give feedback.
-
I've got a suggestion to drop Network and use Swift-NIO for connection.
Swift-NIO is an asynchronous event-driven network application framework.
Initialization: The connection is established using a ClientBootstrap and a MultiThreadedEventLoopGroup.
Sending Data: Data sending is managed using ByteBuffers and the writeAndFlush method.
Receiving Data: Data reception is handled with a custom ByteToMessageDecoder to process incoming data.
Connection Lifecycle: The connection start and stop methods are adjusted for handling with Swift-NIO’s asynchronous patterns.
This focuses on integrating Swift-NIO effectively while preserving the logic and flow of your original application.
Here’s refactored the IBConnection and IBClient classes to use Swift-NIO:
Beta Was this translation helpful? Give feedback.
All reactions