Commit graph

63 commits

Author SHA1 Message Date
ipbeegle
c1f371725a Update PacketProtocol
Add reverse mapping for outgoing packet id<->class
2020-05-25 01:48:32 -04:00
ipbeegle
74ee4fa02b Small optimization to PacketProtocol.getOutgoingId(Class<? extends Packet>) 2020-05-20 23:37:46 -04:00
ipbeegle
27cdf88b36 Add BufferedPacket
Add PacketProtocol.getOutgoingId(Packet) to get id from BufferedPacket
Change TcpPacketCodec.encode to use Packet instance instead of its class
2020-05-20 23:33:27 -04:00
Steveice10
43b394dfdc Check if DNS lookup result is null. 2020-04-21 12:08:50 -07:00
Steveice10
b98e525016 Change SRV lookup code to use dnsjava. 2020-04-21 12:01:26 -07:00
Steveice10
d725ce0d79 Implement proper NIO proxy support and remove synchronous support from
send/disconnect.
2020-02-26 18:15:59 -08:00
Steveice10
32247f3098 Remove dot from end of host in SRV records. 2019-10-20 20:18:58 -07:00
Steveice10
1d5a0ad81b Use Cipher mode constants. 2018-09-06 10:27:21 -07:00
Steveice10
988d411d96 Fix documentation mistake. 2018-08-29 19:24:08 -07:00
Steveice10
ca0dec4a2d Format code. 2017-09-01 12:55:00 -07:00
Steven Smith
c5880f0627 Add packetSending stub to SessionAdapter. 2017-06-27 13:12:02 -07:00
Steveice10
e8a86dafcb Fire event before a packet is sent, allowing the operation to be modified or cancelled. 2017-06-26 15:58:08 -07:00
Steveice10
4608261e99 Migrate away from spacehq.org 2017-03-01 16:09:48 -08:00
Kevin Rossouw
cc4d9869bb Ported library to Netty 4.1.4 (Netty 5 has been discontinued) by modifying TcpSession.java and pom.xml. Fixed a bug in Server.java where isListening() would throw a NullPointerException if called before bind(). Removed unused imports of java.net.InetAddress in Session.java and TcpSession.java. Updated Maven plugin versions in pom.xml. 2017-01-25 16:47:00 +02:00
Steveice10
b5bfe24517 Expose local and remote addresses of Sessions. 2016-12-15 17:05:24 -08:00
Steveice10
f846b96ab4 Generate source and javadoc jars. 2016-12-15 16:57:22 -08:00
Jadon Fowler
333b7d247d
Change Disconnect message to the Throwable's message
Throwable#toString() returns a description of the Throwable that
includes the name of the class appended to
Throwable#getLocalizedMessage(), which can be used for debugging
purposes.
2016-08-21 18:00:17 -07:00
Steven Smith
1b5b2c37a0 Fix readVarLong. 2016-08-13 17:12:34 -07:00
Steven Smith
885d03759d Report when packets are not fully read. 2015-08-24 20:15:51 -07:00
Steven Smith
62d5509768 Add additional array I/O methods, add ByteBuffer-backed NetInput and NetOutput implementations. 2015-08-22 21:52:01 -07:00
Steven Smith
494805306f Remove prefixed byte array methods. 2015-08-22 20:25:04 -07:00
Steven Smith
b7a1cdf2cc Ensure we aren't waiting for a connection when we've been disconnected by the user. 2015-08-21 21:16:20 -07:00
Steven Smith
fa806e58fe Sync future instead of using listener. 2015-08-21 21:14:17 -07:00
Steven Smith
34c2a5c291 Ensure channel is set before returning from connect(). 2015-08-21 21:05:52 -07:00
Steven Smith
310de7c490 Test. 2015-08-21 20:52:17 -07:00
Steven Smith
83a5cb405c Minor fixes and cleanup. 2015-08-21 20:47:37 -07:00
Steven Smith
9c1ac6aa9b Ensure channel is set before returning from bind(). 2015-08-21 20:08:13 -07:00
Steven Smith
ce140f43d6 Cleanup, add wait flag to Server.bind, fix connection errors not throwing DisconnectedEvent. 2015-08-21 19:15:36 -07:00
Steven Smith
4c06294c88 Ensure connection process has fully completed before ending wait loop. 2015-08-20 16:59:59 -07:00
Steven Smith
c68659008b Report exceptions from connection thread. 2015-08-13 19:31:00 -07:00
Steven Smith
26e6ae38a5 General cleanup, fixes, and re-versioning. 2015-07-20 12:09:58 -07:00
Steven Smith
83161ffa03 Update to Netty 5.0.0.Alpha2 2015-07-18 18:55:00 -07:00
Steven Smith
aa1c3051a9 Fix TcpSession CME. 2015-05-02 14:14:05 -07:00
Steven Smith
3687891770 Further improvements to exception handling. 2015-04-17 08:47:10 -07:00
Steven Smith
3d3ebad1f4 Listen for future errors and wait using awaitUninterruptibly in TcpSession.connect. 2015-04-17 08:40:26 -07:00
Steven Smith
634e89ff04 Add exception boolean to TcpSession to halt loops if an exception occurs. 2015-01-25 09:42:11 -08:00
Steven Smith
4cf17e3dea Fix getWriteTimeout 2014-11-23 16:15:20 -08:00
Steven Smith
65e3518aaf Timeout should be multiplied by 1000 for milliseconds. 2014-09-14 21:03:12 -07:00
Steven Smith
11ce15cb03 Ensure currently set timeout and handler is used. 2014-09-14 20:43:39 -07:00
Steven Smith
7b3146c4d4 Catch timeout exceptions throughout all of the connect method, tweak connect timeout application. 2014-09-14 20:14:14 -07:00
Steven Smith
670f5fb219 Use try-catch for connect timeout exception if waiting. 2014-09-14 19:46:05 -07:00
Steven Smith
9cbdc6a1aa More clarification to timeout disconnect messages. 2014-09-14 19:19:57 -07:00
Steven Smith
d418516fe3 Minor message update. 2014-09-14 19:15:55 -07:00
Steven Smith
8fa57eb73a Call timeout handler if connect future results in a ConnectTimeoutException. 2014-09-14 19:13:25 -07:00
Steveice10
7b26b14f31 Expand on timeout control. 2014-08-27 19:53:54 -07:00
Steveice10
249511e80f Allow adjusting timeout and performing actions when a timeout occurs. 2014-08-26 20:21:06 -07:00
Steven Smith
1f8abf7eea Add methods for reading/writing UUIDs as longs. 2014-08-11 11:34:36 -07:00
Steven Smith
2ce93ace27 Add VarLong support, fix compression issue. 2014-08-04 11:28:15 -07:00
Steven Smith
73f375ba20 Add packet compression and methods for reading bytes to an existing array. 2014-07-16 12:46:26 -07:00
Steven Smith
49651dded0 Allow PacketHeader to return -1 for packet IDs to signal that the packet should not be read yet. 2014-06-21 20:15:54 -07:00