Commit Graph

18 Commits

Author SHA1 Message Date
Norman Maurer
c4bb0ea926 Replace usage of UnknownHostException with UnresolveableAddressException. Part of [#2262]
Motivation:
We better use UnresolveableAddressException as NIO does the same.

Modifications:
Replace usage of UnknownHostException with UnresolveableAddressException

Result:
epoll transport and nio transport behave the same way
2014-03-16 08:32:33 -07:00
Norman Maurer
5fa29f9a53 [#2262] Fix NPE triggered by unresolveable InetSocketAddress in epoll transport
Motivation:
At the moment when an unresolvable InetSocketAddress is passed into the epoll transport a NPE is thrown

Modifications:
Add check in place which will throw an UnknownHostException if an InetSocketAddress could not been resolved.

Result:
Proper handling of unresolvable InetSocketAddresses
2014-03-16 06:28:17 -07:00
Norman Maurer
3c359cfde5 [#2297] Correctly close all registered Channels on EpollEventLoop.closeAll() 2014-03-10 20:37:27 +01:00
Aaron Riekenberg
be90418c91 [#2280] Correct logic in Native.finishConnect. Fix use of optval parameter in c getOption function. In epoll event loop, check that channel is open before processing event. 2014-03-09 19:38:57 +01:00
Norman Maurer
6efac6179e [#1259] Add optimized queue for SCMP pattern and use it in NIO and native transport
This queue also produces less GC then CLQ when make use of OneTimeTask
2014-02-27 13:56:15 +01:00
Norman Maurer
01cd5929da Fix check to clear READ_OP and EPOLLIN. Part of [#2254] 2014-02-22 20:06:21 +01:00
Norman Maurer
52535a12f8 [#2254] Correctly handle Channel.read() and ChannelHandlerContext.read()
This includes also when it is called from channelRead(...) and channelReadComplete(...) methods.
2014-02-22 18:54:03 +01:00
Norman Maurer
60b830ba89 Directly use memory addresses for gathering writes to reduce gc pressure. Part of [#2239]
This also does factor out some logic of ChannelOutboundBuffer. Mainly we not need nioBuffers() for many
transports and also not need to copy from heap to direct buffer. So this functionality was moved to
NioSocketChannelOutboundBuffer. Also introduce a EpollChannelOutboundBuffer which makes use of
memory addresses for all the writes to reduce GC pressure
2014-02-21 14:16:37 +01:00
Norman Maurer
bea810707c [#2254] Fix regression in handling autoRead and Channel.read()
This regression was introduced by e0b39159657c9eb711047bc32367537c4870d467
2014-02-21 09:46:28 +01:00
Norman Maurer
f9238d1c15 Correctly handle remove from epoll and EPOLLRDHUP. Also fix a bug with removing EPOLLIN and EPOLLOUT 2014-02-19 16:34:45 +01:00
Norman Maurer
55d0f36a61 Use optimized write and read calls if memoryAddress is present. Part of [#2239] 2014-02-17 17:29:11 +01:00
Trustin Lee
31c24bc981 Fix an inspector warning 2014-02-17 05:27:52 -08:00
Trustin Lee
2a74378d01 Overall clean-up in EpollSocketChannel
- Extract writev part from doWrite() for simplicity
- Clearer comments
2014-02-17 05:21:49 -08:00
Norman Maurer
52050796e7 [#2238] Fix bug which caused a SIGSEGV when calling remoteAddress() or localAddress() 2014-02-17 12:00:12 +01:00
Norman Maurer
e0669522a3 Correctly update the ByteBuffers position on write and writev 2014-02-17 07:29:33 +01:00
Norman Maurer
b1e7cefe32 Use correct writerIndex when read for channel 2014-02-16 20:44:06 +01:00
Norman Maurer
49cbf1d6b9 Fix compile error in test 2014-02-15 23:05:26 +01:00
Norman Maurer
e0299e1222 Introduce a native transport for linux using epoll ET
This transport use JNI (C) to directly make use of epoll in Edge-Triggered mode for maximal performance on Linux. Beside this it also support using TCP_CORK and produce less GC then the NIO transport using JDK NIO.
It only builds on linux and skip the build if linux is not used. The transport produce a jar which contains all needed .so files for 32bit and 64 bit. The user only need to include the jar as dependency as usually
to make use of it and use the correct classes.

This includes also some cleanup of @trustin
2014-02-15 22:42:07 +01:00