Package org.menacheri.jetserver.communication

Examples of org.menacheri.jetserver.communication.NettyTCPMessageSender


  {
    LOG.trace("Going to clear pipeline");
    // Clear the existing pipeline
    NettyUtils.clearPipeline(channel.getPipeline());
    // Set the tcp channel on the session.
    NettyTCPMessageSender sender = new NettyTCPMessageSender(channel);
    playerSession.setTcpSender(sender);
    // Connect the pipeline to the game room.
    gameRoom.connectSession(playerSession);
    playerSession.setWriteable(true);// TODO remove if unnecessary. It should be done in start event
    // Send the re-connect event so that it will in turn send the START event.
View Full Code Here


        {
          LOG.trace("Going to clear pipeline");
          // Clear the existing pipeline
          NettyUtils.clearPipeline(channel.getPipeline());
          // Set the tcp channel on the session.
          NettyTCPMessageSender sender = new NettyTCPMessageSender(channel);
          playerSession.setTcpSender(sender);
          // Connect the pipeline to the game room.
          gameRoom.connectSession(playerSession);
          // Send the connect event so that it will in turn send the START event.
          playerSession.onEvent(Events.connectEvent(sender));
View Full Code Here

  }
 
  protected void handleReJoin(PlayerSession playerSession, GameRoom gameRoom, Channel channel)
  {
    // Set the tcp channel on the session.
    NettyTCPMessageSender sender = new NettyTCPMessageSender(channel);
    playerSession.setTcpSender(sender);
    // Connect the pipeline to the game room.
    gameRoom.connectSession(playerSession);
    channel.write(Events.GAME_ROOM_JOIN_SUCCESS, null);//assumes that the protocol applied will take care of event objects.
    playerSession.setWriteable(true);// TODO remove if unnecessary. It should be done in start event
View Full Code Here

            "Sending GAME_ROOM_JOIN_SUCCESS to channel {} completed",
            channel.getId());
        if (future.isSuccess())
        {
          // Set the tcp channel on the session.
          NettyTCPMessageSender sender = new NettyTCPMessageSender(
              channel);
          playerSession.setTcpSender(sender);
          // Connect the pipeline to the game room.
          gameRoom.connectSession(playerSession);
          // Send the connect event so that it will in turn send the
View Full Code Here

TOP

Related Classes of org.menacheri.jetserver.communication.NettyTCPMessageSender

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.