|
|
|
|
|
by mike_hearn
3428 days ago
|
|
A telnet server is just a socket connected to a pty, no? I'm not sure there's much to it, which is why it's so easy in node. I guess in java you'd do the same program something like this: ServerSocket server = new ServerSocket(8080);
while (true) {
try (Socket sock = server.accept()) {
sock.getOutputStream().write("Hello world!".getBytes());
}
}
It's a bit more verbose, but hey, that's Java.I think maybe the issue there is you got distracted by the idea that you needed a library. Commons-Net doesn't actually provide a telnet server because it doesn't need to. That said, I agree that Commons-Net doesn't have great docs. I think it's fallen out of use over time. These days if you wanted a powerful non-blocking socket library you'd use Netty or VertX. The docs for Netty are much better: http://netty.io/wiki/index.html |
|
Cheers and have a good day!