Sort tcp packets #94

Merged
merged 21 commits into from Apr 23, 2014

Conversation

Projects
None yet
2 participants
@joekiller
Contributor

joekiller commented Apr 22, 2014

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)

This comment has been minimized.

@buger

buger Apr 23, 2014

Owner

What is the difference from sorting that i already doing?

@buger

buger Apr 23, 2014

Owner

What is the difference from sorting that i already doing?

This comment has been minimized.

@joekiller

joekiller Apr 23, 2014

Contributor

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/buger/gor/pull/94/files#r11887582
.

@joekiller

joekiller Apr 23, 2014

Contributor

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/buger/gor/pull/94/files#r11887582
.

This comment has been minimized.

@buger

buger Apr 23, 2014

Owner

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

@buger

buger Apr 23, 2014

Owner

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

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@joekiller joekiller deleted the joekiller:sort_tcp_packets branch Apr 23, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment