类 ConnectionUtils
java.lang.Object
net.neoforged.neoforge.network.connection.ConnectionUtils
Utility class for storing and retrieving
Connection
objects from ChannelHandlerContext
objects.-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static Connection
getConnection
(io.netty.channel.ChannelHandlerContext connection) Gets theConnection
object from theChannelHandlerContext
object.static void
removeConnection
(io.netty.channel.ChannelHandlerContext connection) Removes theConnection
object from theChannelHandlerContext
object.static void
setConnection
(io.netty.channel.ChannelHandlerContext connection, Connection value) Sets theConnection
object to theChannelHandlerContext
object.
-
字段详细资料
-
ATTRIBUTE_CONNECTION
-
-
构造器详细资料
-
ConnectionUtils
private ConnectionUtils()
-
-
方法详细资料
-
getConnection
Gets theConnection
object from theChannelHandlerContext
object.- 参数:
connection
- TheChannelHandlerContext
object.- 返回:
- The
Connection
object.
-
setConnection
@Internal public static void setConnection(io.netty.channel.ChannelHandlerContext connection, Connection value) Sets theConnection
object to theChannelHandlerContext
object.- 参数:
connection
- TheChannelHandlerContext
object.value
- TheConnection
object.
-
removeConnection
@Internal public static void removeConnection(io.netty.channel.ChannelHandlerContext connection) Removes theConnection
object from theChannelHandlerContext
object.- 参数:
connection
- TheChannelHandlerContext
object.
-