vapor-community / sockets

🔌 Non-blocking TCP socket layer, with event-driven server and client.
MIT License
575 stars 54 forks source link

Various improvements #92

Closed andreasley closed 7 years ago

andreasley commented 7 years ago

Improved performance

Previously, all bytes received were passed trough an map operation that is not required, since the bytes are already UInt8. This change improves performance for large transfers considerably.

Improves https://github.com/vapor/vapor/issues/734

Improved cleanup and safety

Improved testing

tanner0101 commented 7 years ago

Great find. Tests failed on macOS, though. Re-rerunning to make sure it wasn't a network issue.

andreasley commented 7 years ago

I've had tests on CI failing for no reason in the last few weeks – tests that succeeded every time when run locally. I think we're pushing the boundaries of Travis with all this TCP stuff. :) In general, I think it's best to create sockets in tests on any available port instead of a specific one.

tanner0101 commented 7 years ago

Yeah, I'm pretty sure it's their issue. The tests were written by the original author of this package so hopefully they don't need to be reworked just for Travis.

loganwright commented 7 years ago

I'm not sure why these lines are failing on osx:

https://github.com/vapor/socks/blob/ea09c395312e772ae9ad9a8834c61411fcaec10a/Tests/SocksCoreTests/OptionsTests.swift#L29

https://github.com/vapor/socks/blob/ea09c395312e772ae9ad9a8834c61411fcaec10a/Tests/SocksCoreTests/OptionsTests.swift#L33

codecov-io commented 7 years ago

Current coverage is 64.93% (diff: 75.63%)

No coverage report found for master at bd9af15.

Powered by Codecov. Last update bd9af15...bcdcabe