Channel.me:这是一个神奇的网站

Channel.me是一款在线协同工具,支持多人同时浏览并编辑同一网页,适用于远程会议、产品讨论等多种场景。

电脑上的远程协助功能,相信不少人都用过,对于很多菜鸟级网民来说,让好朋友异地帮忙修电脑似乎很神奇,但是一旦授权给对方,只能看着他操作,缺少了交互的乐趣。今天介绍的Channel.me却能让身处异地的人同时访问某个网页,而且可以随意在网页上进行编辑、标注、讨论和留言等。

Channel.me是一款基于web的在线协同合作工具。功能很强大,用法却很简单,打开Channel.me网站,不需要注册和登录,只要在主页的地址框中输入想要跟朋友或同事一起访问的页面地址,然后系统就能自动创建一个短链接。

用户通过Facebook、email等方式将这个链接发送给邀请对象,对方收到信息后,不需要下载和安装插件,就能直接进入你所在的页面。

完成这一步后,你和你的朋友就能同时浏览同一个网页,更神奇之处在于,参与协同访问的所有人在页面上的一举一动都能被其他人实时看到,比如对某段文字进行高亮显示、对页面的某个细节提出修改意见等等,大家可以通过页面中的即时通工具互动。

从上述功能可以看出Channel.me的使用范围相当广泛,看到好玩的页面可以邀请好朋友一起分享讨论,也可以用它来进行远程会议、新产品讨论、对手网站分析……总之如果需要远程协同服务,Channel.me都是个不错的选择。

目前Channel.me主要支持Chrome、Firefox浏览器,IE、遨游等则会出现打不开的现象。

华太师雷锋网专稿,转载请注明!)
io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds 1048576: 369295621 - discarded at io.netty.handler.codec.LengthFieldBasedFrameDecoder.fail(LengthFieldBasedFrameDecoder.java:503) at io.netty.handler.codec.LengthFieldBasedFrameDecoder.failIfNecessary(LengthFieldBasedFrameDecoder.java:489) at io.netty.handler.codec.LengthFieldBasedFrameDecoder.exceededFrameLength(LengthFieldBasedFrameDecoder.java:376) at io.netty.handler.codec.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:419) at io.netty.handler.codec.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:332) at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:501) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:440) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:750)
最新发布
11-25
`io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds 1048576: 369295621 - discarded` 异常通常在Netty应用程序中,接收到的数据包长度超过了预设的最大长度时抛出,常见于TCP粘包情况,发送端连续发送多个数据包,接收端无法准确划分每个数据包的边界,导致数据粘连 [^3]。以下是可能的解决方法: ### 1. 调整最大帧长度 在使用 `LengthFieldBasedFrameDecoder` 时,可以通过调整其构造函数中的 `maxFrameLength` 参数来增加允许的最大帧长度。例如: ```java import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelPipeline; import io.netty.channel.socket.SocketChannel; import io.netty.handler.codec.LengthFieldBasedFrameDecoder; public class MyChannelInitializer extends ChannelInitializer<SocketChannel> { @Override protected void initChannel(SocketChannel ch) throws Exception { ChannelPipeline pipeline = ch.pipeline(); // 增加最大帧长度 pipeline.addLast(new LengthFieldBasedFrameDecoder(369295621, 0, 4, 0, 4)); // 其他处理器 } } ``` 在上述代码中,将 `maxFrameLength` 参数设置为 `369295621`,以允许接收长度为该值的帧。 ### 2. 检查长度格式和大小 - **长度格式问题**:确保发送端和接收端对于长度字段的定义一致,包括长度字段的位置、长度等。例如,如果长度字段是4字节的整数,那么在发送和接收时都要按照4字节整数的方式处理。 - **长度大小问题**:检查发送端发送的数据长度是否合理,避免发送过长的数据。如果数据确实需要很长,可以考虑对数据进行分段发送和接收。 ### 3. 处理粘包问题 可以使用Netty提供的其他解码器或自定义解码器来解决粘包问题,确保接收端能够准确划分每个数据包的边界。例如,可以使用 `DelimiterBasedFrameDecoder` 基于分隔符来划分数据包: ```java import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioServerSocketChannel; import io.netty.handler.codec.DelimiterBasedFrameDecoder; import io.netty.handler.codec.string.StringDecoder; import io.netty.handler.codec.string.StringEncoder; import io.netty.buffer.Unpooled; public class NettyServer { private final int port; public NettyServer(int port) { this.port = port; } public void run() throws Exception { EventLoopGroup bossGroup = new NioEventLoopGroup(); EventLoopGroup workerGroup = new NioEventLoopGroup(); try { ServerBootstrap b = new ServerBootstrap(); b.group(bossGroup, workerGroup) .channel(NioServerSocketChannel.class) .childHandler(new ChannelInitializer<SocketChannel>() { @Override public void initChannel(SocketChannel ch) throws Exception { ch.pipeline().addLast(new DelimiterBasedFrameDecoder( 369295621, Unpooled.copiedBuffer("|".getBytes()))); ch.pipeline().addLast(new StringDecoder()); ch.pipeline().addLast(new StringEncoder()); ch.pipeline().addLast(new NettyServerHandler()); } }) .option(ChannelOption.SO_BACKLOG, 128) .childOption(ChannelOption.SO_KEEPALIVE, true); ChannelFuture f = b.bind(port).sync(); f.channel().closeFuture().sync(); } finally { workerGroup.shutdownGracefully(); bossGroup.shutdownGracefully(); } } public static void main(String[] args) throws Exception { new NettyServer(8080).run(); } } ``` 在上述代码中,使用 `DelimiterBasedFrameDecoder` 基于分隔符 `|` 来划分数据包,避免粘包问题。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值