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

Sort tcp packets #94

Merged
merged 21 commits into from Apr 23, 2014
Merged

Sort tcp packets #94

merged 21 commits into from Apr 23, 2014

Conversation

joekiller
Copy link
Contributor

This should fix #92. I upped the message timeout slightly to allow some larger POSTS to move all their packets more successfully.

Thanks for the help @ElPeque

i++
}

sort.Ints(mk)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference from sorting that i already doing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may be misreading but it appears that the current method collects an
integer array of the index positions of the packets within a message and
then composes the byte array in the order which the packets came in. The
new method sorts the packet array based off of each packet's Seq number and
then composes the byte array.
On Apr 23, 2014 2:00 AM, "Leonid Bugaev" notifications@github.com wrote:

In raw_socket_listener/tcp_message.go:

  • i := 0
  • for k, _ := range t.packets {
  •   mk[i] = k
    
  •   i++
    

- }

  • sort.Ints(mk)

What is the difference from sorting that i already doing?

Reply to this email directly or view it on GitHubhttps://github.com//pull/94/files#r11887582
.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you know i realized bug. Yes, you pull request should fix issue, thanks!

buger added a commit that referenced this pull request Apr 23, 2014
@buger buger merged commit ce5ee74 into buger:master Apr 23, 2014
@joekiller joekiller deleted the sort_tcp_packets branch April 23, 2014 14:36
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.

input_tcp messages merged together occasionally
2 participants