67 Commits

Author SHA1 Message Date
Aeadoin
f752b57a55
[Cleanup] Cleanup uses of insert/push_back when a temp object is used. (#3170) 2023-04-03 16:45:01 -04:00
Chris Miles
19791195e5
[Logging] Netcode Logging Unify (#2443)
* [Logging] Unify netcode logging

* More tweaks, generator

* Exclude OP_SpecialMesg at callback level

* Consolidate packet loggers

* Log at EQStream level instead of proxy

* Fix C->S

* Server to server logging

* C-S for Loginserver

* Hook UCS for C->S

* Update eqemu_logsys.h

* World C->S logging

* Translate opcodes through patch system for client to server

* Additional logging requests

* Add detailed opcode translation logging

* vStringFormat resiliency

* Translate loginserver C->S

* Simplify out message string (reduce copies) and ignore legacy formats

* Update eqemu_logsys.cpp

* Log file format

* Handle deprecated categories
2022-09-28 03:42:09 -05:00
hg
c847e3da86
[Netcode] Adjust first packet for compress flag (#2326)
When a packet was over max_raw_size and zlib failed to compress the
first packet chunk then the final output would be 513 bytes which
exceeded m_max_packet_size of 512.

This occured because the first packet chunk used sublen without
adjusting for the new_length + 1 compression flag added in Compress().
When the packet failed to compress then it was already at its max.
After the first packet, chunk sizes are calculated using max_raw_size
which already accounted for the compress flag. (From #979)

This should fix #2325
2022-07-27 08:52:25 -05:00
KimLS
2fbd5aaccc Rename namespace EQEmu to namespace EQ (so we don't have two similar but different namespaces anymore) 2020-05-17 18:36:06 -07:00
peterigz
21ed02ca52 Add missing break for OP_AppCombined switch statement 2020-04-17 18:27:45 +01:00
hg
ed09d4ae54 Send packet uncompressed if zlib deflates to a larger size than input
It's not guaranteed that deflate output will be smaller than the input.

In some cases zlib-ng (Z_BEST_SPEED) compression is causing packets to
increase in size and exceed m_max_packet_size. This results in the
packets never being fully received by the client.

Currently this is most reproducible in the spell_book section of the
OP_PlayerProfile message. After using #scribespells this portion of the
player profile has a lot of incrementing spellids which may be affecting
the compression algorithm. The client never processes the player profile
(MSG_SEND_PC) message and times out on zone entry.

This isn't necessarily a bug with zlib-ng since it inflates back to the
original input and normal zlib could do this too, but the current netcode
doesn't handle this.
2020-02-14 10:06:47 -05:00
Michael Cook (mackal)
4241fba7e2 Forgot 2 exceptions 2020-01-16 19:10:04 -05:00
KimLS
63198d974e Merge branch 'feature/eqemu-api-data-service-netstats' of github.com:EQEmu/Server into feature/eqemu-api-data-service-netstats 2019-04-16 01:09:31 -07:00
KimLS
cd8ab727aa Tweaks from other branch 2019-04-16 01:09:25 -07:00
Akkadius
1d88b063aa Change compression level in deflate 2019-04-15 00:12:11 -05:00
KimLS
cbfd02b9ff Remove logging from daybreak network code to make it thread safe, there is a threadsafe replacement if you care (there's only like 4 logs in the code anyway); made event loop thread local so we can have one for each thread 2019-03-15 21:34:23 -07:00
KimLS
675a67b676 Set data rate to disabled by default 2019-03-10 03:28:44 -07:00
KimLS
777f182282 Update fmt lib with submodule 2019-03-10 00:10:47 -08:00
KimLS
ee1fcdf5fa Stats, stats everywhere (I added a #netstats command) 2019-03-09 22:25:04 -08:00
KimLS
b156b078ed Revert internal send to old code 2019-02-24 15:20:01 -08:00
KimLS
e3d5200310 Redid background task interface, used it to async send client packets 2019-01-07 19:53:23 -08:00
KimLS
6c1e3ae3d6 Added some rules for network server startup, added a limit on number of resends per connection channel per cycle (default is 10) 2019-01-03 20:04:09 -08:00
KimLS
d20ea3852c Some changes to resend logic and default values 2019-01-02 20:57:40 -08:00
Michael Cook (mackal)
70f55179b6 Switch netcode to steady_clock 2018-06-28 22:16:25 -04:00
Michael Cook (mackal)
ee4a79616f Lets can't a reference in resends 2018-03-03 00:59:44 -05:00
KimLS
a1ff12d9ab Fix for unreliable packets not being processed or sent correctly 2017-07-22 14:18:30 -07:00
Akkadius
c8b20ecb1a Adjust switch case formatting in daybreak_connection.cpp 2017-07-12 22:01:59 -05:00
Akkadius
45b29aedf3 Bring back netcode to robust commit 34549a4 - proven and tested by PEQ and EZ as solid/stable with all of recent packet fixes 2017-07-12 21:49:30 -05:00
KimLS
7300776a85 Fix for bug where packets were not combining when sent inside cwnd, altered some settings 2017-07-06 18:03:19 -07:00
KimLS
3878bd0c76 Move to an older implementation 2017-07-06 17:25:00 -07:00
KimLS
a7c0e82c9e Tweaks and bug fixes 2017-07-05 20:24:39 -07:00
KimLS
49505a7a45 Bug fix plus tweak to reset cwnd when no longer needed 2017-07-04 21:03:49 -07:00
KimLS
10b01e62df More tweaks 2017-07-04 12:45:23 -07:00
KimLS
c6bb4a6470 Some tweaks 2017-07-03 21:31:25 -07:00
KimLS
eddc9c9baf Only increase cwnd when full, fiddled with formulas 2017-07-01 13:46:39 -07:00
KimLS
8d680b2222 Some changes 2017-06-30 22:40:05 -07:00
KimLS
5c6f684808 Some work on congestion avoidance now uses a sliding congestion window instead of a static one 2017-06-29 14:13:55 -07:00
Akkadius
6cc774faf4 Adjust netcode variables proven to be stable for players 2017-06-24 20:10:12 -05:00
KimLS
a7c239b801 Some changes to the outbound queue and default settings 2017-06-23 21:52:28 -07:00
KimLS
1cabb091e7 Added packet buffering for dbg connections to avoid connections sending a ton of packets at once 2017-06-22 22:26:12 -07:00
KimLS
8d391a7e3f Daybreak connection setting tweaks 2017-04-26 22:58:36 -07:00
KimLS
6d59baffaf Basic mod setup only supports combat hooks for now I'll add a few more before i push this 2017-04-26 22:56:18 -07:00
KimLS
eec6687083 Modified default values a bit to be more agggressive 2017-04-14 16:24:29 -07:00
KimLS
6596dfeeba Tweaks to how resend is calculated to help our friends with smoke signal connections 2017-04-13 19:40:58 -07:00
KimLS
3acd845a79 Remove some logging that's not needed anymore and fix a bug when data rollover happens that can cause the connection to not internally ack packets and then disconnect. 2017-04-05 19:51:06 -07:00
KimLS
8509f05f0a Console wip, change how we send acks back to some old behavior 2017-04-04 23:21:32 -07:00
KimLS
281483efc1 Merge of a monster 2017-04-02 20:03:51 -07:00
KimLS
cfdbca6f12 Fix for unreliable packets (kind of a hack but it works) being flagged as corrupt 2017-03-20 00:22:50 -07:00
KimLS
1ce1073930 Change resend timeout to 1 min instead of 10 missed packets, added a close buffer for end of connection 2017-03-14 21:15:41 -07:00
KimLS
310d27c0bd Some changes to tic rates and default values 2017-03-12 18:38:33 -07:00
KimLS
742806158c Some changes to sync sending, dont even bother sending them now just wait to reply 2017-03-11 14:50:10 -08:00
KimLS
56fdc6aaac Change default settings 2017-03-10 23:31:51 -08:00
KimLS
d494048ff6 Tweaks to make server more lag tolerant and also send less packets. 2017-03-07 18:13:17 -08:00
KimLS
da81b7a76d No longer buffer ack packets to resolve an issue where the client was hanging slightly on connection termination 2017-03-05 19:09:27 -08:00
KimLS
0b4484b36b Some reverts and changes to default values and a bug fix 2017-03-01 13:00:48 -08:00