kr5ch / rkon-core Goto Github PK
View Code? Open in Web Editor NEWSource RCON Protocol Java library
License: MIT License
Source RCON Protocol Java library
License: MIT License
This may just be an issue I'm having, but here's my setup:
My program has a TextField (calls ActionEvent when Enter is pressed) which contains the following code:
String text = getTextField().getText().trim();
if (!text.isEmpty()) {
try {
System.out.println(rcon.command(text));
} catch (IOException e1) {
e1.printStackTrace();
}
getTextField().setText("");
}
I need to input text twice for rcon.command() to work. Well, my initial command isn't printed, then after that all subsequent commands are printed, but behind by one command.
I tryed to connect with my Squad Server but i didnt work. It works perfect with Minecraft
Hi, I get this error while I am using this library in android but in PC it is work
net.kronos.rkon.core.ex.MalformedPacketException: Cannot read the whole packet at net.kronos.rkon.core.RconPacket.read(RconPacket.java:136) at net.kronos.rkon.core.RconPacket.send(RconPacket.java:65) at net.kronos.rkon.core.Rcon.send(Rcon.java:106) at net.kronos.rkon.core.Rcon.command(Rcon.java:99) at ivanzar.servertools.rcon.RconTask.doInBackground(RconTask.java:66) at ivanzar.servertools.rcon.RconTask.doInBackground(RconTask.java:25) at android.os.AsyncTask$2.call(AsyncTask.java:288) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)
Rcon rcon;
try {
rcon = new Rcon(ip, port, pass.getBytes());
} catch (IOException e) {
e.printStackTrace();
err = ERR_UNKNOWN_HOST;
return;
} catch (AuthenticationException e) {
e.printStackTrace();
err = ERR_UNKNOWN_HOST;
return;
}
try {
out = rcon.command(cmd);
err = NO_ERRORS;
} catch (IOException e) {
e.printStackTrace();
err = ERR_IO_EXCEPTION;
return;
}
Hi, i have this problem:
02-05 21:32:46.861 25260-25724/ivanzar.servertools W/System.err: core.ex.MalformedPacketException: Cannot read the whole packet 02-05 21:32:46.861 25260-25724/ivanzar.servertools W/System.err: at core.RconPacket.read(RconPacket.java:136) 02-05 21:32:46.861 25260-25724/ivanzar.servertools W/System.err: at core.RconPacket.send(RconPacket.java:65) 02-05 21:32:46.862 25260-25724/ivanzar.servertools W/System.err: at core.Rcon.send(Rcon.java:106) 02-05 21:32:46.862 25260-25724/ivanzar.servertools W/System.err: at core.Rcon.command(Rcon.java:99) 02-05 21:32:46.862 25260-25724/ivanzar.servertools W/System.err: at ivanzar.servertools.activity.ConsoleActivity$2.doInBackground(ConsoleActivity.java:150) 02-05 21:32:46.862 25260-25724/ivanzar.servertools W/System.err: at ivanzar.servertools.activity.ConsoleActivity$2.doInBackground(ConsoleActivity.java:135) 02-05 21:32:46.862 25260-25724/ivanzar.servertools W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:288) 02-05 21:32:46.862 25260-25724/ivanzar.servertools W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237) 02-05 21:32:46.863 25260-25724/ivanzar.servertools W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 02-05 21:32:46.863 25260-25724/ivanzar.servertools W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 02-05 21:32:46.863 25260-25724/ivanzar.servertools W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 02-05 21:32:46.864 25260-25724/ivanzar.servertools W/System.err: at java.lang.Thread.run(Thread.java:818)
Whats about a licence?
I would use your code in my product but I cant provice any changes back.
Because I'm going to split your project.
Am I allowed to copy & paste your code and use it as mine or do you want to be called?
Hello. Today I was trying to implement your code to my application and the code didn't work and it didn't throw any errors as well. I tried to track down the exact spot where the code stopped working and found out that in file RconPocket.java at line 113 it just stops and does nothing. I tried to fix it myself but couldn't really do it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.