hoijui / JavaOSC

OSC content format/"protocol" library for JVM languages
http://www.illposed.com/software/javaosc.html
BSD 3-Clause "New" or "Revised" License
156 stars 43 forks source link

Refactor transport-level code in preparation for TCP support #47

Closed daveyarwood closed 4 years ago

daveyarwood commented 4 years ago

Background

See my comment here: https://github.com/hoijui/JavaOSC/issues/12#issuecomment-559085565

To summarize, the current implementation of JavaOSC is UDP only, and there is a lot of transport-level code (all UDP-specific) in OSCPortIn and OSCPortOut.

I plan to implement TCP support soon, and I want for users to be able to continue to use the same public API, with only the small additional step of setting the network protocol to TCP, something like this:

new OSCPortInBuilder().setPort(12345).setNetworkProtocol(TCP).build();

As a first step towards that, this PR refactors / reorganizes the parts of the codebase that have to do with transport. The next step will be to simply add a TCPTransport class and OSCPort{In,Out}Builder methods to allow the user to specify the network protocol.

Summary of changes

Feedback welcome! :slightly_smiling_face:

daveyarwood commented 4 years ago

Closing this in favor of #52, which includes these commits and many more!