Class RawSocketChannel
- java.lang.Object
-
- io.netty.util.DefaultAttributeMap
-
- io.netty.channel.AbstractChannel
-
- io.netty.channel.oio.AbstractOioChannel
-
- io.netty.channel.oio.AbstractOioByteChannel
-
- io.netty.channel.oio.OioByteStreamChannel
-
- org.apache.plc4x.java.utils.rawsockets.netty.RawSocketChannel
-
- All Implemented Interfaces:
io.netty.channel.Channel,io.netty.channel.ChannelOutboundInvoker,io.netty.util.AttributeMap,Comparable<io.netty.channel.Channel>
public class RawSocketChannel extends io.netty.channel.oio.OioByteStreamChannelChannel based on a Pcap4J raw-socket, allowing to actively communicate based on ethernet frames.
-
-
Constructor Summary
Constructors Constructor Description RawSocketChannel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.channel.ChannelConfigconfig()protected voiddoBind(SocketAddress localAddress)protected voiddoConnect(SocketAddress remoteAddress, SocketAddress localAddress)protected voiddoDisconnect()protected intdoReadBytes(io.netty.buffer.ByteBuf buf)SocketAddressgetLocalAddress()org.pcap4j.util.MacAddressgetLocalMacAddress()SocketAddressgetRemoteAddress()org.pcap4j.util.MacAddressgetRemoteMacAddress()protected booleanisInputShutdown()booleanisOpen()protected SocketAddresslocalAddress0()protected io.netty.channel.AbstractChannel.AbstractUnsafenewUnsafe()protected SocketAddressremoteAddress0()voidsetRemoteMacAddress(org.pcap4j.util.MacAddress remoteMacAddress)protected io.netty.channel.ChannelFutureshutdownInput()-
Methods inherited from class io.netty.channel.oio.OioByteStreamChannel
activate, available, doClose, doWriteBytes, doWriteFileRegion, isActive
-
Methods inherited from class io.netty.channel.oio.AbstractOioByteChannel
doRead, doWrite, filterOutboundMessage, metadata
-
Methods inherited from class io.netty.channel.oio.AbstractOioChannel
clearReadPending, doBeginRead, isCompatible, isReadPending, setReadPending
-
Methods inherited from class io.netty.channel.AbstractChannel
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doDeregister, doRegister, doShutdownOutput, equals, eventLoop, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, localAddress, maxMessagesPerWrite, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, remoteAddress, toString, unsafe, validateFileRegion, voidPromise, write, write, writeAndFlush, writeAndFlush
-
-
-
-
Method Detail
-
setRemoteMacAddress
public void setRemoteMacAddress(org.pcap4j.util.MacAddress remoteMacAddress)
-
isInputShutdown
protected boolean isInputShutdown()
- Specified by:
isInputShutdownin classio.netty.channel.oio.AbstractOioByteChannel
-
shutdownInput
protected io.netty.channel.ChannelFuture shutdownInput()
- Specified by:
shutdownInputin classio.netty.channel.oio.AbstractOioByteChannel
-
doConnect
protected void doConnect(SocketAddress remoteAddress, SocketAddress localAddress) throws Exception
- Specified by:
doConnectin classio.netty.channel.oio.AbstractOioChannel- Throws:
Exception
-
localAddress0
protected SocketAddress localAddress0()
- Specified by:
localAddress0in classio.netty.channel.AbstractChannel
-
remoteAddress0
protected SocketAddress remoteAddress0()
- Specified by:
remoteAddress0in classio.netty.channel.AbstractChannel
-
doBind
protected void doBind(SocketAddress localAddress)
- Specified by:
doBindin classio.netty.channel.AbstractChannel
-
doDisconnect
protected void doDisconnect() throws org.pcap4j.core.NotOpenException- Specified by:
doDisconnectin classio.netty.channel.AbstractChannel- Throws:
org.pcap4j.core.NotOpenException
-
doReadBytes
protected int doReadBytes(io.netty.buffer.ByteBuf buf) throws Exception- Overrides:
doReadBytesin classio.netty.channel.oio.OioByteStreamChannel- Throws:
Exception
-
config
public io.netty.channel.ChannelConfig config()
-
isOpen
public boolean isOpen()
-
newUnsafe
protected io.netty.channel.AbstractChannel.AbstractUnsafe newUnsafe()
- Overrides:
newUnsafein classio.netty.channel.oio.AbstractOioChannel
-
getRemoteAddress
public SocketAddress getRemoteAddress()
-
getRemoteMacAddress
public org.pcap4j.util.MacAddress getRemoteMacAddress()
-
getLocalAddress
public SocketAddress getLocalAddress()
-
getLocalMacAddress
public org.pcap4j.util.MacAddress getLocalMacAddress()
-
-