WebsocketClientHandler.java 文件源码

java
阅读 31 收藏 0 点赞 0 评论 0

项目:Blaubot 作者:
/**
 * Creates a new WebSocketClientHandler that manages the BlaubotWebsocketConnection
 * @param uri                  The uri to connect with
 * @param remoteUniqueDeviceId the unique device id of the device we are connecting to
 * @param listenerReference    a reference Object that handles the connection listener
 */
public WebsocketClientHandler(URI uri, String remoteUniqueDeviceId, AtomicReference<IBlaubotIncomingConnectionListener> listenerReference) {
    // Connect with V13 (RFC 6455 aka HyBi-17).
    // other options are V08 or V00.
    // If V00 is used, ping is not supported and remember to change
    // HttpResponseDecoder to WebSocketHttpResponseDecoder in the pipeline.
    this.handshaker = WebSocketClientHandshakerFactory.newHandshaker(uri, WebSocketVersion.V13, null, false, new DefaultHttpHeaders(), BlaubotWebsocketAdapter.MAX_WEBSOCKET_FRAME_SIZE);
    this.remoteDeviceUniqueDeviceId = remoteUniqueDeviceId;
    this.incomingConnectionListenerReference = listenerReference;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号