/* Local Options: Constant Description ISIG Enable SIGINTR, SIGSUSP, SIGDSUSP, and SIGQUIT signals ICANON Enable canonical input (else raw) XCASE Map uppercase \lowercase (obsolete) ECHO Enable echoing of input characters ECHOE Echo erase character as BS-SP-BS ECHOK Echo NL after kill character ECHONL Echo NL NOFLSH Disable flushing of input buffers after interrupt or quit characters IEXTEN Enable extended functions ECHOCTL Echo control characters as ^char and delete as ~? ECHOPRT Echo erased character as character erased ECHOKE BS-SP-BS entire line on line kill FLUSHO Output being flushed PENDIN Retype pending input at next read or input char TOSTOP Send SIGTTOU for background output */
/* 在非标准的输入程序模式下, 输入的资料不会被组合成一行而输入後的处理功能 (清除, 杀掉, 删除, 等等.) 都不能使用. 这个模式有两个功能控制 参数: c_cc[VTIME] 设定字元输入时间计时器, 及 c_cc[VMIN] 设定满足读取功能的最低字元接收个数. 如果 MIN > 0 且 TIME = 0, MIN 设定为满足读取功能的最低字元接收个数. 由於TIME是零, 所以计时器将不被使用. 如果 MIN = 0 且 TIME > 0, TIME 将被当做逾时设定值. 满足读取功能的情况为读取到单一字元, 或者超过TIME 所定义的时间(t = TIME *0.1 s). 如果超过 TIME 所定义的时间, 则不会传回任何字元. 如 果 MIN > 0 且 TIME > 0, TIME 将被当做一个分割字元组的计时器. 满足读取功能的条件为 接收到 MIN 个数的字元, 或两个字元的间隔时间超过 TIME 所定义的值. 计时器会在每读到一个字元後重新计时, 且只会在第一个字元收到後才会启动. 如果 MIN = 0 且 TIME = 0, 读取功能就马上被满足. 目前所存在的字元组个数, 或者 将回传的字元组个数. 根据 Antonino (参考贡献) 所说, 你可以用 fcntl(fd, F_SETFL, FNDELAY); 在读取前得到相同的结果. */ /* UNIX serial interface drivers provide the ability to specify character and packet timeouts. Two elements of the c_cc array are used for timeouts: VMIN and VTIME. Timeouts are ignored in canonical input mode or when the NDELAY option is set on the file via open or fcntl. */ /* 由于我们使用非阻塞方式,因此设置无效 */
/* 设置接收为Raw模式 */ m_Opt.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); /* Input Options: Constant Description INPCK Enable parity check IGNPAR Ignore parity errors PARMRK Mark parity errors ISTRIP Strip parity bits IXON Enable software flow control (outgoing) IXOFF Enable software flow control (incoming) IXANY Allow any character to start flow again IGNBRK Ignore break condition BRKINT Send a SIGINT when a break condition is detected INLCR Map NL to CR IGNCR Ignore CR ICRNL Map CR to NL IUCLC Map uppercase to lowercase IMAXBEL Echo BEL on input line too long */
话说jsp 我是在学生时代 学的
php是现在工作
安全性上我不知道,就特殊功能上,我深感,PHP不如JSP方便。不是PHP功能不行,而是该类资料大部分查到的都是JAVA的代码或C#。PHP的高级功能在网上介绍的比较少。除非你全部自己写,否则要强化功能就得用C++来强化。要不就等着PHP升级。而JAVA的强大确实不容多说的。PHP其实也能做到,只是它做起来就显得比JSP复杂。就好象早期的ASP应用比PHP复杂一样。一个普通上传ASP就得大量代码来完成,而PHP只要几句代码,但是在普通应用上,直到今天,ASP依然有站点应用。 纯个人看法, 随着WEB功能的需求的越来越高,JSP在未来的WEB领域一定会大放异彩!而。NET,虽然功能强大,凭借微软推荐的C#应该也可以,但是个人认为却局限于平台问题。也许未必一定能发展得很好。
Local Options:
Constant Description
ISIG Enable SIGINTR, SIGSUSP, SIGDSUSP, and SIGQUIT signals
ICANON Enable canonical input (else raw)
XCASE Map uppercase \lowercase (obsolete)
ECHO Enable echoing of input characters
ECHOE Echo erase character as BS-SP-BS
ECHOK Echo NL after kill character
ECHONL Echo NL
NOFLSH Disable flushing of input buffers after interrupt or quit characters
IEXTEN Enable extended functions
ECHOCTL Echo control characters as ^char and delete as ~?
ECHOPRT Echo erased character as character erased
ECHOKE BS-SP-BS entire line on line kill
FLUSHO Output being flushed
PENDIN Retype pending input at next read or input char
TOSTOP Send SIGTTOU for background output
*/
在非标准的输入程序模式下, 输入的资料不会被组合成一行而输入後的处理功能
(清除, 杀掉, 删除, 等等.) 都不能使用. 这个模式有两个功能控制 参数: c_cc[VTIME]
设定字元输入时间计时器, 及 c_cc[VMIN] 设定满足读取功能的最低字元接收个数. 如果 MIN > 0 且 TIME = 0, MIN 设定为满足读取功能的最低字元接收个数.
由於TIME是零, 所以计时器将不被使用. 如果 MIN = 0 且 TIME > 0, TIME 将被当做逾时设定值. 满足读取功能的情况为读取到单一字元,
或者超过TIME 所定义的时间(t = TIME *0.1 s). 如果超过 TIME 所定义的时间, 则不会传回任何字元. 如 果 MIN > 0 且 TIME > 0, TIME 将被当做一个分割字元组的计时器.
满足读取功能的条件为 接收到 MIN 个数的字元, 或两个字元的间隔时间超过 TIME 所定义的值.
计时器会在每读到一个字元後重新计时, 且只会在第一个字元收到後才会启动. 如果 MIN = 0 且 TIME = 0, 读取功能就马上被满足. 目前所存在的字元组个数, 或者
将回传的字元组个数. 根据 Antonino (参考贡献) 所说,
你可以用 fcntl(fd, F_SETFL, FNDELAY); 在读取前得到相同的结果.
*/
/*
UNIX serial interface drivers provide the ability to specify character and packet timeouts.
Two elements of the c_cc array are used for timeouts: VMIN and VTIME. Timeouts are ignored
in canonical input mode or when the NDELAY option is set on the file via open or fcntl.
*/ /* 由于我们使用非阻塞方式,因此设置无效 */
m_Opt.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); /*
Input Options:
Constant Description
INPCK Enable parity check
IGNPAR Ignore parity errors
PARMRK Mark parity errors
ISTRIP Strip parity bits
IXON Enable software flow control (outgoing)
IXOFF Enable software flow control (incoming)
IXANY Allow any character to start flow again
IGNBRK Ignore break condition
BRKINT Send a SIGINT when a break condition is detected
INLCR Map NL to CR
IGNCR Ignore CR
ICRNL Map CR to NL
IUCLC Map uppercase to lowercase
IMAXBEL Echo BEL on input line too long
*/