Skip to content

pcap.rb dump function is async ? #6

Description

@yanzou

hi, I was using this gem for parsing and filtering pcap, then I came across a problem:

header = ::Pcap::Capture.open_dead(parser.datalink, parser.snaplen)
dumper = ::Pcap::Dumper.open(header, new_file)
  #do some thing

#dump to new file
dumper.dump(pkt) if dumper

file_size = get_file_size(new_file) #  file_size ----------> got 12kb

but, after this when I look at the file in the file system, it became 16 kb

So , my question is the dumper.dump() function is async ? If it is async, can I got complete event ?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions