Add FightServerConnection
Dieser Commit ist enthalten in:
Ursprung
89691e0c24
Commit
3f18ed9c1c
2
.idea/.gitignore
generiert
vendored
2
.idea/.gitignore
generiert
vendored
@ -1,2 +0,0 @@
|
||||
# Default ignored files
|
||||
/workspace.xml
|
6
.idea/vcs.xml
generiert
6
.idea/vcs.xml
generiert
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -67,6 +67,9 @@ public class FightServerConnection {
|
||||
* 1 - No Connect
|
||||
* 2 - Error while cleanup
|
||||
* 3 - Error while pre cleanup
|
||||
* 4 - Error while writing
|
||||
* 5 - Error while reading
|
||||
* 6 - Error while flushing
|
||||
*/
|
||||
private int errorCode = 0;
|
||||
|
||||
@ -128,7 +131,7 @@ public class FightServerConnection {
|
||||
try {
|
||||
return inputStream.read();
|
||||
} catch (IOException e) {
|
||||
errorCode = 3;
|
||||
errorCode = 5;
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
@ -139,7 +142,7 @@ public class FightServerConnection {
|
||||
inputStream.read(bytes);
|
||||
return bytes;
|
||||
} catch (IOException e) {
|
||||
errorCode = 3;
|
||||
errorCode = 5;
|
||||
return new byte[length];
|
||||
}
|
||||
}
|
||||
@ -176,7 +179,7 @@ public class FightServerConnection {
|
||||
try {
|
||||
outputStream.flush();
|
||||
} catch (IOException e) {
|
||||
errorCode = 5;
|
||||
errorCode = 6;
|
||||
}
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren