projects
/
xudocci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make port configurable.
[xudocci.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
xdcc
/
ui
/
stdin
/
NetworkAdapter.java
diff --git
a/src/main/java/net/pterodactylus/xdcc/ui/stdin/NetworkAdapter.java
b/src/main/java/net/pterodactylus/xdcc/ui/stdin/NetworkAdapter.java
index
cff376a
..
a45a341
100644
(file)
--- a/
src/main/java/net/pterodactylus/xdcc/ui/stdin/NetworkAdapter.java
+++ b/
src/main/java/net/pterodactylus/xdcc/ui/stdin/NetworkAdapter.java
@@
-44,6
+44,7
@@
public class NetworkAdapter extends AbstractExecutionThreadService {
/** The core being controlled. */
private final Core core;
/** The core being controlled. */
private final Core core;
+ private final int port;
/**
* Creates a new network acceptor.
/**
* Creates a new network acceptor.
@@
-51,14
+52,15
@@
public class NetworkAdapter extends AbstractExecutionThreadService {
* @param eventBus
* @param core
*/
* @param eventBus
* @param core
*/
- public NetworkAdapter(EventBus eventBus, Core core) {
+ public NetworkAdapter(EventBus eventBus, Core core
, int port
) {
this.eventBus = eventBus;
this.core = core;
this.eventBus = eventBus;
this.core = core;
+ this.port = port;
}
@Override
protected void run() throws Exception {
}
@Override
protected void run() throws Exception {
- ServerSocket serverSocket = new ServerSocket(
45678
);
+ ServerSocket serverSocket = new ServerSocket(
port
);
serverSocket.setSoTimeout((int) TimeUnit.SECONDS.toMillis(1));
while (isRunning()) {
try {
serverSocket.setSoTimeout((int) TimeUnit.SECONDS.toMillis(1));
while (isRunning()) {
try {