Confusion about raw vs. cooked terminal modes?

前端 未结 2 1242
耶瑟儿~
耶瑟儿~ 2020-12-18 04:35

I currently have a chat client that communicates successfully with a server. I am supposed to modify the behavior so that the prompt moves

2条回答
  •  执念已碎
    2020-12-18 04:55

    In raw mode, characters are passed directly to your program. For example, when you type in a terminal in cooked mode, the characters you type are instantly echoed on the screen. In raw mode, the characters are ignored by the terminal (that is, not echoed) and your program has the option of whether or not to echo it.

    EDIT: Wikipedia has a good article on cooked mode. http://en.wikipedia.com/wiki/Cooked_Mode Also, note that in raw mode, even and similar characters are handed directly to your program.

提交回复
热议问题