• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

A simple packet dumper for old MMOs using Winsock send() and recv()

[emoji848]
Legend
Joined
Dec 3, 2011
Messages
2,232
Reaction score
1,518
Looks simple and doing the job!

Small suggestion, you might want to use a stringstream there rather than your string and all the appends, then flush it before opening the file. Running much more efficient on performance there on the long run. Next level efficiency would be a buffer as you have a fixed size of MAX_PATH on the filename, but prolly overkill for this scenario.
 
Joined
Jun 10, 2009
Messages
659
Reaction score
141
Looks simple and doing the job!

Small suggestion, you might want to use a stringstream there rather than your string and all the appends, then flush it before opening the file. Running much more efficient on performance there on the long run. Next level efficiency would be a buffer as you have a fixed size of MAX_PATH on the filename, but prolly overkill for this scenario.

I'll try to improve these in the next release. Thanks for the feedback! :thumbup1:
 
Back
Top