Commit graph

116 commits

Author SHA1 Message Date
Camotoy
4e4d8af687
Temp revert "Sync the future on wait (#43)" for snapshot
This reverts commit a09d0fd00a.
2022-01-08 22:12:55 -05:00
Oskar
a09d0fd00a
Sync the future on wait (#43) 2022-01-04 22:45:41 -06:00
Oskar
50b53e8902
Add switch case for KQueue in TcpServer#bindImpl (#42) 2022-01-04 22:43:57 -06:00
Camotoy
4cb1588e3f Add option to validate decompression 2021-12-20 20:38:15 -05:00
Camotoy
9e38c61927 Remove allocations for packet receive and send events
These were just replaced with functions that call the session and packet.
2021-11-24 23:32:14 -05:00
Camotoy
67fb81e027 Reduce unnecessary checks and only add encryption when enabled 2021-11-24 19:29:19 -05:00
Camotoy
a61bcb97f7 Use a constructor parameter to determine clientsideness in packet encoder 2021-11-24 11:21:14 -05:00
Camotoy
2a8d18a3f8
Add an option to read from enum 2021-11-15 14:38:17 -05:00
RednedEpic
1188c1486f Replace reflection usage with a supplier 2021-11-13 19:59:20 -06:00
RednedEpic
ec983f1447 Remove final for some packet methods 2021-11-13 16:41:57 -06:00
RednedEpic
816c0db6d7 Fix javadoc 2021-11-13 14:55:06 -06:00
RednedEpic
b1c85550f6 Update incoming & outgoing naming to serverbound & clientbound
Also determine which map to pull the packet from based on whether we're working with a client or server.
2021-11-13 14:53:46 -06:00
RednedEpic
3fdf9ea1d5 Allow for registering with packet definition directly 2021-11-13 12:41:51 -06:00
RednedEpic
98d9d91ca4 Remove deprecations here and any reflection usage
Methods were less than a day old
2021-11-12 23:06:14 -06:00
Redned
e295601d7c Replace reflection usage with packet factories 2021-11-12 22:59:08 -06:00
Camotoy
489979d2bc
Require packets to have a NetInput constructor
This permits packets to have final fields, and prevents setAccessible and no-args constructor requirements.
2021-11-12 23:04:14 -05:00
Camotoy
2776c24e05
Merge in Geyser changes to master (#38)
* Use TCP_NODELAY and Epoll where possible

* Add KQueue and respect disableNativeEventLoop property

* Inject

* works?

* Make it pretty

* Don't create a TCP EventLoopGroup unless needed

* Add method for determining if we connected internally

* fix datagrams

* Support HAProxy probably

* Set a bunch of things as final

* Allow setting direct ByteBufs preferred

* Expose channel; don't do packets on another thread

* Don't set channel to null and do some more optimizing

* Remove custom thread factory

* Remove unused SocketChannelWrapper class

* Remove all local channel classes

* Allow for packets to be handled on a separate thread

Co-authored-by: creeper123123321 <7974274+creeper123123321@users.noreply.github.com>
2021-11-12 11:12:52 -05:00
RK_01
ccfb1aa94d
Fix memory leak by closing De-/Inflater (#36) 2021-10-26 17:52:57 -04:00
TeksuSiK
d9a277ffb4
Move determine transport method to helper 2021-08-15 21:12:25 +02:00
TeksuSiK
09f620eb31
Add io_uring DatagramChannel to DNS resolver queries 2021-08-15 19:44:00 +02:00
TeksuSiK
bc42215a4a
Fix mistake in socket channel initialization for Nio 2021-08-15 19:02:04 +02:00
TeksuSiK
d23c3ac8fe
Implement IO_URING async syscalls interface 2021-08-15 18:59:17 +02:00
TeksuSiK
e992437da6
Changew ServerSocketChannel implementation classes to SocketChannel implementation types 2021-08-15 17:25:59 +02:00
TeksuSiK
e6ca9ecc8d
Check is epoll available and use it if so 2021-08-15 17:17:49 +02:00
Camotoy
312cff5f97
Optimize SRV resolving only when required
- Add an option to disable SRV resolving
- Don't resolve SRV records if not a domain (in one instance this shortened loading times by five seconds)
2021-03-16 20:07:03 -04:00
Steveice10
19a9b2be35 Collapse Client and Server into *ClientSession and ConnectionListener. 2021-01-15 12:45:06 -08:00
Steveice10
09d7774037 Default client local address to 0.0.0.0. 2021-01-15 12:07:12 -08:00
VADemon
126b0e67de Use proper @Nullable annotation from spotbugs 2020-12-23 13:21:12 +01:00
VADemon
1df02557d1 Local address binding: return bind addresses from Session if connected 2020-12-23 12:58:52 +01:00
VADemon
83201135ec Use proper Client constructor 2020-12-23 11:29:48 +01:00
VADemon
30588f7be0 Add local address binding to Client 2020-12-21 15:58:02 +01:00
Mark Vainomaa
a651cb0b26
Implement HAProxy PROXY protocol support for client 2020-12-19 22:51:43 +02:00
Mark Vainomaa
b94345387b
Resolve remote address eagerly 2020-12-19 05:08:43 +02:00
Steveice10
ead6afae39 Move DnsNameResolver creation into try-catch block. 2020-11-21 12:59:51 -08:00
Steveice10
42e417fc50 Replace session host and port with resolved SRV record, bump version to 1.7. 2020-06-28 13:43:40 -07:00
Steveice10
d8bfc98d05 Properly release DNS query resources. 2020-06-03 12:17:19 -07:00
Steveice10
bfd0687b3c Replace dnsjava with netty DNS support. 2020-06-01 14:07:46 -07:00
Steveice10
75f0f02d89 Move priority packet handling to channelRead0. 2020-05-31 17:32:21 -07:00
Steveice10
8dbe3d081c Make sure bad packet data is skipped when errors are suppressed. 2020-05-31 17:23:22 -07:00
Steveice10
b025025001 Call PacketErrorEvent for more I/O errors. 2020-05-31 17:15:44 -07:00
Steveice10
72bde6a3c0 Fix stack overflow in flag methods. 2020-05-30 15:38:24 -07:00
Steveice10
be70b05e3c More improvements to flag methods. 2020-05-30 15:33:56 -07:00
Steveice10
12d26014fa Update dnsjava to 3.1.0 and add result to debug output. 2020-05-30 15:22:11 -07:00
Steveice10
d82b1b688d Change DNS error printing to a debug printing flag. 2020-05-30 11:57:33 -07:00
Steveice10
8eaefa9cfc Add javadocs to BuiltinFlags. 2020-05-30 10:55:04 -07:00
Steveice10
fd7772a9b0 Improve implementation of flag methods. 2020-05-30 10:52:37 -07:00
Steveice10
5291bea6a0 Add flag for printing DNS resolution errors. 2020-05-30 10:49:39 -07:00
ipbeegle
ff20c8f2a5 Change StreamNetInput, StreamNetOutput
convert to using Java filter streams
update syntax
2020-05-25 05:21:10 -04:00
ipbeegle
68542b8e58 Update PacketProtocol
remove negative packet id checks from createIncomingPacket and getOutgoingClass
update syntax
2020-05-25 05:13:13 -04:00
ipbeegle
f2adf41dd2 Add reset method to StreamNetInput 2020-05-25 02:42:11 -04:00