Package networking.response

Source Code of networking.response.ResponseHeartbeat

package networking.response;

import metadata.Constants;
import utility.GamePacket;

/**
*
* @author Xuyuan
*/
public class ResponseHeartbeat extends GameResponse {

    public ResponseHeartbeat() {
        responseCode = Constants.SMSG_HEARTBEAT;
    }

    @Override
    public byte[] constructResponseInBytes() {
        //If clients get this response, it does nothing.
        GamePacket packet = new GamePacket(responseCode);
        packet.addShort16((short) 0);
        return packet.getBytes();
    }
}
TOP

Related Classes of networking.response.ResponseHeartbeat

TOP
Copyright © 2018 www.massapi.com. 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.