How does telnet work with Java server?
-
Hey all, So I'm currently working on a Java server and I want to connect to it via telnet. So we're currently using a DataOutputStream to print out to the telnet, but what do I use to read what ever is inputed from the telnet client?
-
Answer:
You should have a ServerSocket that creates a Socket every time someone connects to your server. When this happens, you can use that socket to get an InputStream via Socket.getInputStream(). Then, you can wrap that InputStream with whatever type of utility input stream you want (like a DataInputStream). Socket newConnection=ServerSocket.accept(); InputStream socketInputStream=new DataInputStream(newConnection.getInputSt…
pegasus7... at Yahoo! Answers Visit the source
Related Q & A:
- How to build my own Java Math library?Best solution by Yahoo! Answers
- How to use jTable in java?Best solution by Yahoo! Answers
- How to do references in Java work?Best solution by stackoverflow.com
- How does Increment operator work in Java?Best solution by Stack Overflow
- How do i find my incoming server and my outgoing email server name?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.