public abstract class AbstractConnection extends java.lang.Object implements Connection
Modifier | Constructor and Description |
---|---|
protected |
AbstractConnection(io.netty.channel.Channel channel,
java.net.InetSocketAddress remote) |
Modifier and Type | Method and Description |
---|---|
protected io.netty.channel.Channel |
channel() |
java.lang.String |
getLocalIpAddress()
Get the local ip-address to which this
Connection is listening to
as a String . |
int |
getLocalPort()
Get the local port to which this
Connection is listening to. |
byte[] |
getRawLocalIpAddress()
Get the local ip-address to which this
Connection is listening to
as a byte-array. |
byte[] |
getRawRemoteIpAddress()
Get the remote ip-address to which this
Connection is connected
to as a byte-array. |
java.net.InetSocketAddress |
getRemoteAddress()
Get the remote address to which this
Connection is connected to. |
java.lang.String |
getRemoteIpAddress()
Get the remote ip-address to which this
Connection is connected
to as a String . |
int |
getRemotePort()
Get the remote port to which this
Connection is connected to. |
boolean |
isSCTP()
Check whether or not this
Connection is using SCTP as its
underlying transport protocol. |
boolean |
isTCP()
Check whether or not this
Connection is using TCP as its
underlying transport protocol. |
boolean |
isTLS()
Check whether or not this
Connection is using TLS as its
underlying transport protocol. |
boolean |
isUDP()
Check whether or not this
Connection is using UDP as its
underlying transport protocol. |
boolean |
isWS()
Check whether or not this
Connection is using websocket as its
underlying transport protocol. |
protected io.netty.buffer.ByteBuf |
toByteBuf(io.pkts.packet.sip.SipMessage msg)
All
Connection s needs to convert the msg to a ByteBuf
before writing it to the ChannelHandlerContext . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connect, send
protected AbstractConnection(io.netty.channel.Channel channel, java.net.InetSocketAddress remote)
protected io.netty.channel.Channel channel()
public byte[] getRawRemoteIpAddress()
Connection
Connection
is connected
to as a byte-array.getRawRemoteIpAddress
in interface Connection
public byte[] getRawLocalIpAddress()
Connection
Connection
is listening to
as a byte-array.getRawLocalIpAddress
in interface Connection
public final java.lang.String getLocalIpAddress()
Connection
Connection
is listening to
as a String
.getLocalIpAddress
in interface Connection
public final java.net.InetSocketAddress getRemoteAddress()
Connection
Connection
is connected to.getRemoteAddress
in interface Connection
public final java.lang.String getRemoteIpAddress()
Connection
Connection
is connected
to as a String
.getRemoteIpAddress
in interface Connection
public int getLocalPort()
Connection
Connection
is listening to.getLocalPort
in interface Connection
public int getRemotePort()
Connection
Connection
is connected to.getRemotePort
in interface Connection
public boolean isUDP()
Connection
Connection
is using UDP as its
underlying transport protocol.isUDP
in interface Connection
public boolean isTCP()
Connection
Connection
is using TCP as its
underlying transport protocol.isTCP
in interface Connection
public boolean isTLS()
Connection
Connection
is using TLS as its
underlying transport protocol.isTLS
in interface Connection
public boolean isSCTP()
Connection
Connection
is using SCTP as its
underlying transport protocol.isSCTP
in interface Connection
public boolean isWS()
Connection
Connection
is using websocket as its
underlying transport protocol.isWS
in interface Connection
protected io.netty.buffer.ByteBuf toByteBuf(io.pkts.packet.sip.SipMessage msg)
Connection
s needs to convert the msg to a ByteBuf
before writing it to the ChannelHandlerContext
.msg
- the SipMessage
to convert.ByteBuf
Copyright © 2015. All Rights Reserved.