@ParametersAreNonnullByDefault public abstract class RakNetSession extends Object implements SessionConnection<io.netty.buffer.ByteBuf>
| Modifier and Type | Method and Description |
|---|---|
io.netty.buffer.ByteBuf |
allocateBuffer(int capacity) |
void |
close() |
void |
close(DisconnectReason reason) |
void |
disconnect() |
void |
disconnect(DisconnectReason reason) |
InetSocketAddress |
getAddress() |
io.netty.channel.Channel |
getChannel() |
io.netty.channel.EventLoop |
getEventLoop() |
int |
getMtu() |
long |
getPing() |
int |
getProtocolVersion() |
abstract RakNet |
getRakNet() |
InetSocketAddress |
getRealAddress() |
double |
getRTT() |
int |
getSessionTimeout() |
RakNetState |
getState() |
boolean |
isClosed() |
boolean |
isStale() |
boolean |
isStale(long curTime) |
boolean |
isTimedOut() |
boolean |
isTimedOut(long curTime) |
protected void |
onClose() |
void |
onDatagram(io.netty.buffer.ByteBuf buffer) |
protected abstract void |
onPacket(io.netty.buffer.ByteBuf buffer) |
void |
send(io.netty.buffer.ByteBuf buf) |
void |
send(io.netty.buffer.ByteBuf buf,
RakNetPriority priority) |
void |
send(io.netty.buffer.ByteBuf buf,
RakNetPriority priority,
RakNetReliability reliability) |
void |
send(io.netty.buffer.ByteBuf buf,
RakNetPriority priority,
RakNetReliability reliability,
int orderingChannel) |
void |
send(io.netty.buffer.ByteBuf buf,
RakNetReliability reliability) |
void |
sendImmediate(io.netty.buffer.ByteBuf buf) |
void |
setSessionTimeout(int timeout)
timeout in ms ( 1 second = 1000 )
|
protected void |
tick(long curTime) |
public InetSocketAddress getAddress()
getAddress in interface SessionConnection<io.netty.buffer.ByteBuf>public InetSocketAddress getRealAddress()
getRealAddress in interface SessionConnection<io.netty.buffer.ByteBuf>public int getMtu()
public int getProtocolVersion()
public long getPing()
getPing in interface SessionConnection<io.netty.buffer.ByteBuf>public double getRTT()
public io.netty.buffer.ByteBuf allocateBuffer(int capacity)
public void onDatagram(io.netty.buffer.ByteBuf buffer)
protected abstract void onPacket(io.netty.buffer.ByteBuf buffer)
protected void tick(long curTime)
public void disconnect()
disconnect in interface SessionConnection<io.netty.buffer.ByteBuf>public void disconnect(DisconnectReason reason)
disconnect in interface SessionConnection<io.netty.buffer.ByteBuf>public void close()
close in interface SessionConnection<io.netty.buffer.ByteBuf>public void close(DisconnectReason reason)
close in interface SessionConnection<io.netty.buffer.ByteBuf>protected void onClose()
public void sendImmediate(io.netty.buffer.ByteBuf buf)
sendImmediate in interface SessionConnection<io.netty.buffer.ByteBuf>public void send(io.netty.buffer.ByteBuf buf)
send in interface SessionConnection<io.netty.buffer.ByteBuf>public void send(io.netty.buffer.ByteBuf buf,
RakNetPriority priority)
public void send(io.netty.buffer.ByteBuf buf,
RakNetReliability reliability)
public void send(io.netty.buffer.ByteBuf buf,
RakNetPriority priority,
RakNetReliability reliability)
public void send(io.netty.buffer.ByteBuf buf,
RakNetPriority priority,
RakNetReliability reliability,
@Nonnegative
int orderingChannel)
public int getSessionTimeout()
public void setSessionTimeout(int timeout)
public boolean isStale(long curTime)
public boolean isStale()
public boolean isTimedOut(long curTime)
public boolean isTimedOut()
public boolean isClosed()
isClosed in interface SessionConnection<io.netty.buffer.ByteBuf>public abstract RakNet getRakNet()
public RakNetState getState()
public io.netty.channel.Channel getChannel()
public io.netty.channel.EventLoop getEventLoop()
Copyright © 2018–2021. All rights reserved.