47 lines
739 B
Java
47 lines
739 B
Java
package com.xiaoliu.protocol.request;
|
|
|
|
import com.xiaoliu.protocol.Packet;
|
|
import lombok.Data;
|
|
import lombok.EqualsAndHashCode;
|
|
import lombok.Getter;
|
|
|
|
import java.io.FileOutputStream;
|
|
|
|
import static com.xiaoliu.protocol.command.Command.LOGIN_PACKET_REQUEST;
|
|
|
|
@EqualsAndHashCode(callSuper = true)
|
|
@Data
|
|
public class LoginPacket extends Packet {
|
|
|
|
String name;
|
|
|
|
String id;
|
|
|
|
String fileName;
|
|
|
|
long fileLength;
|
|
|
|
long readLength;
|
|
|
|
FileOutputStream fileOutputStream;
|
|
|
|
boolean exec = false;
|
|
|
|
@Override
|
|
public Byte getCommand() {
|
|
return LOGIN_PACKET_REQUEST;
|
|
}
|
|
|
|
public LoginPacket() {
|
|
}
|
|
|
|
public LoginPacket(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public LoginPacket(String name, String id) {
|
|
this.name = name;
|
|
this.id = id;
|
|
}
|
|
}
|