ziutek / telnet

Package to handle a telnet connection
Other
141 stars 60 forks source link

conn.Read Ctrl+c failed #21

Open LuckyChen666 opened 3 years ago

LuckyChen666 commented 3 years ago

unknown command: 242

embeddedgo commented 3 years ago

Can you give me some more info about this issue (sample code)? How do you send this Ctrl-C?

LuckyChen666 commented 3 years ago

Can you give me some more info about this issue (sample code)? How do you send this Ctrl-C?

I am implementing a web terminal.When i want to cmd ctrl+c,the error appeared. con, _ := telnet.Dial("tcp", addr) for{ buf := make([]byte, 1024) n, err := con.Read(buf) if err != nil { fmt.Println( err) break } }

LuckyChen666 commented 3 years ago

Can you give me some more info about this issue (sample code)? How do you send this Ctrl-C?

I am implementing a web terminal.When i want to cmd ctrl+c,the error appeared. con, _ := telnet.Dial("tcp", addr) for{ buf := make([]byte, 1024) n, err := con.Read(buf) if err != nil { fmt.Println( err) break } }

I have solve it by add cmdData = 242

ziutek commented 3 years ago

It seems the cmdData command isn't handled.

Can you share the way you handled it?