Use java to create license file license.2x.
Code below:
import com.smartfoxserver.v2.entities.data.SFSObject;
import com.smartfoxserver.v2.protocol.binary.DefaultPacketCompressor;
import java.io.*;
import java.util.Random;
public class Main {
public static void main(String[] args) {
try {
SaveLicense();
OpenLicense();
} catch (Exception e) {
e.printStackTrace();
}
}
public static void SaveLicense() throws IllegalArgumentException, SecurityException, IOException {
SFSObject license = new SFSObject();
license.putUtfString("customer", "BlueEffie");// 授权人,为空则为共享版,否则个人版
license.putUtfString("bind", "127.0.0.1");// 限制IP ,也就是服务器的公网IP!!如果写内网IP则只能在内网上访问。
license.putInt("users", -1);// 连接数上限,-1为无限数量
license.putLong("expire", 0);// 版权到期时间,0为无限制
license.putBool("private", false);// 私有?
byte[] objectBytes = license.toBinary();
try {