本文整理汇总了Java中org.ethereum.net.rlpx.MessageCodec类的典型用法代码示例。如果您正苦于以下问题:Java MessageCodec类的具体用法?Java MessageCodec怎么用?Java MessageCodec使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MessageCodec类属于org.ethereum.net.rlpx包,在下文中一共展示了MessageCodec类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getChannelFactory
import org.ethereum.net.rlpx.MessageCodec; //导入依赖的package包/类
@Bean
public EthereumChannelInitializer.ChannelFactory getChannelFactory(RskSystemProperties config,
EthereumListener ethereumListener,
ConfigCapabilities configCapabilities,
NodeManager nodeManager,
EthHandlerFactory ethHandlerFactory,
StaticMessages staticMessages,
PeerScoringManager peerScoringManager) {
return () -> {
HandshakeHandler handshakeHandler = new HandshakeHandler(config, peerScoringManager);
MessageQueue messageQueue = new MessageQueue();
P2pHandler p2pHandler = new P2pHandler(config, ethereumListener, configCapabilities);
MessageCodec messageCodec = new MessageCodec(ethereumListener, config);
return new Channel(config, messageQueue, p2pHandler, messageCodec, handshakeHandler, nodeManager, ethHandlerFactory, staticMessages);
};
}
示例2: rlpxMaxFrameSize
import org.ethereum.net.rlpx.MessageCodec; //导入依赖的package包/类
@ValidateMe
public int rlpxMaxFrameSize() {
return configFromFiles.hasPath("peer.p2p.framing.maxSize") ? configFromFiles.getInt("peer.p2p.framing.maxSize") : MessageCodec.NO_FRAMING;
}
示例3: rlpxMaxFrameSize
import org.ethereum.net.rlpx.MessageCodec; //导入依赖的package包/类
@ValidateMe
public int rlpxMaxFrameSize() {
return config.hasPath("peer.p2p.framing.maxSize") ? config.getInt("peer.p2p.framing.maxSize") : MessageCodec.NO_FRAMING;
}