Package org.jwebsocket.api

Examples of org.jwebsocket.api.EngineConfiguration


  @Override
  public WebSocketEngine initializeEngine() {
    if (log.isDebugEnabled()) {
      log.debug("Instantiating engine...");
    }
    EngineConfiguration config = getEngineConfiguration();
    WebSocketEngine newEngine = null;
    try {
      newEngine = new TCPEngine(config);
      //newEngine = new NettyEngine(config);
    } catch (Exception e) {
View Full Code Here


    @Override
    public void run() {
      WebSocketEngine engine = getEngine();

      int lMaxFrameSize = JWebSocketCommonConstants.DEFAULT_MAX_FRAME_SIZE;
      EngineConfiguration config = engine.getConfiguration();
      if (config != null && config.getMaxFramesize() > 0) {
        lMaxFrameSize = config.getMaxFramesize();
      }
      byte[] lBuff = new byte[lMaxFrameSize];
      int pos = -1;
      int lStart = -1;
View Full Code Here

            // since handshaking is done, replace the encoder/decoder with
            // web socket data frame encoder/decoder
            ChannelPipeline p = ctx.getChannel().getPipeline();
            p.remove("aggregator");
            EngineConfiguration config = engine.getConfiguration();
            if (config == null || config.getMaxFramesize() == 0) {
                p.replace("decoder", "jwsdecoder", new WebSocketFrameDecoder(JWebSocketCommonConstants.DEFAULT_MAX_FRAME_SIZE));
            } else {
                p.replace("decoder", "jwsdecoder", new WebSocketFrameDecoder(config.getMaxFramesize()));
            }
            p.replace("encoder", "jwsencoder", new WebSocketFrameEncoder());
           
            //if the WebSocket connection URI is wss then start SSL TLS handshaking
            if (req.getUri().startsWith("wss:")) {
View Full Code Here

    mLog = Logging.getLogger(JWebSocketEmbedded.class);

    // initialize the engine
    List lDomains = new FastList();
    lDomains.add("http://jwebsocket.org");
    EngineConfiguration lEngineConfig = new EngineConfig(
        "tcp0", // id
        "org.jwebsocket.tcp.engines.TCPEngine", // name
        "-", // jar, needs to be in classpath, i.e. embedded in .jar'/manifest
        8787, // port
        120000, // default session timeout
View Full Code Here

TOP

Related Classes of org.jwebsocket.api.EngineConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.