Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added pption to force reliable ordering of TCP messages. #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Rich2020
Copy link

Hi Jamie,

As discussed, I've made an option to toggle the forced reliability of TCP message ordering.

I've made changes to two files:

  • Added TcpOptions with property ForceReliableOrdering to enable forced reliable ordering.
  • Modified TcpConnection.BodyReadCallback to make use of ForceReliableOrdering.

I took a quick look, and it seems that the TcpOptions class is a clean way to go as we do not want to have to set forced order reliability twice (on connection and on args.Connection in the NewConnection callback).

To use this, simply put TcpOptions.ForceReliableOrdering = true; anywhere in your code and messages will arrive in the order in which they were sent. By default, this option is set to false.

Please note that I had to add .vs/ to the bottom of the .gitignore file as I was getting sqllite.db locks... see: https://stackoverflow.com/a/48220209/596841

Hope this change is acceptable and that it is helpful.

Kind regards,
Rich

- Added TcpOptions with property 'ForceReliableOrdering' to enable forced reliable ordering.
- Modified TcpConnection BodyReadCallback to make use of ForceReliableOrdering.
@JamJar00
Copy link
Member

Hi Rich,

Sorry about the delay in reviewing this, my internet's been intermittent the last week!

The changes all look good but my only concern is that some people may prefer the property to be different between connections hence being better as a property of TcpConnection. Maybe new connections could be given the correct value based upon a value set in the listener?

The change for the VSCode folder is absolutely fine!

Jamie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants