public class IdentServer extends Object implements Closeable, Runnable
Most IRC servers attempt to contact the ident server on connecting hosts in order to determine the user's identity. A few IRC servers will not allow you to connect unless this information is provided.
So when a PircBotX is run on a machine that does not run an ident server, it may be necessary to provide a "faked" response by starting up its own ident server and sending out apparently correct responses.
Modifier and Type | Method and Description |
---|---|
void |
close()
Calls
stopServer() |
String |
handleNextConnection(InetSocketAddress remoteAddress,
String line)
Wait for and process the next connection.
|
void |
run()
Waits for a client to connect to the ident server before making an
appropriate response.
|
void |
start()
Start the ident server in a new thread.
|
static void |
startServer()
Start the ident server with the systems default charset.
|
static void |
startServer(Charset encoding,
InetAddress localAddress)
Start the ident server with the specified charset.
|
static void |
stopServer()
Stop the server and clear pending ident responses.
|
public static void startServer()
Charset.defaultCharset()
public static void startServer(Charset encoding, InetAddress localAddress)
encoding
- The encoding to use for connectionspublic static void stopServer() throws IOException
IOException
public void start()
public void run()
public String handleNextConnection(InetSocketAddress remoteAddress, String line) throws IOException
IOException
- If any error occurred during reading or writingpublic void close() throws IOException
stopServer()
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2010–2020 Leon Blakey. All rights reserved.