Package telnet provides TELNET and TELNETS client and server implementations, for the Go programming language, in a style similar to the "net/http" library that is part of the Go standard library, including support for "middleware"; TELNETS is secure TELNET, with the TELNET protocol over a secured TLS (or SSL) connection.
I try to check Telnet server is running or not in my project. I am testing on Docker image. I used DialTo() function with passing address like 127.0.0.1:23. It seems perfect when I check as just below:
_, err := telnet.DialTo("127.0.0.1:23")
if err != nil {
log.Fatalln("error while connecting Telnet server:", err)
}
fmt.Println("Telnet server is running...")
Program prints out Telnet server is running.... Then, I tried another port, but not Telnet server, Redis's port. I changed the address with 127.0.0.1:6378. And, it still works. I think this is not appropriate way to implement this client. I just want to talk with Telnet server and its ports, not other servers and their ports. Is there any way to solve that problem with this package? If there is not, I'd like to try add this feature with your helps.
I try to check Telnet server is running or not in my project. I am testing on Docker image. I used
DialTo()
function with passing address like127.0.0.1:23
. It seems perfect when I check as just below:Program prints out
Telnet server is running...
. Then, I tried another port, but not Telnet server, Redis's port. I changed the address with127.0.0.1:6378
. And, it still works. I think this is not appropriate way to implement this client. I just want to talk with Telnet server and its ports, not other servers and their ports. Is there any way to solve that problem with this package? If there is not, I'd like to try add this feature with your helps.