All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.gusavila92.websocketclient.model.Payload Maven / Gradle / Ivy

Go to download

A very lightweight WebSocket client library for Java/Android which aims to implement the WebSocket protocol as defined in RFC 6455

There is a newer version: 1.2.2
Show newest version
package tech.gusavila92.websocketclient.model;

/**
 * A payload that will be send through the WebSocket connection
 * 
 * @author Gustavo Avila
 *
 */
public class Payload {
	/**
	 * Opcode of the payload
	 */
	private int opcode;

	/**
	 * Data included into the payload
	 */
	private byte[] data;

	/**
	 * Initializes the variables
	 * 
	 * @param opcode
	 * @param data
	 */
	public Payload(int opcode, byte[] data) {
		this.opcode = opcode;
		this.data = data;
	}

	/**
	 * Returns the opcode
	 * 
	 * @return
	 */
	public int getOpcode() {
		return opcode;
	}

	/**
	 * Returns the data
	 * 
	 * @return
	 */
	public byte[] getData() {
		return data;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy