![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C/C++
zzs85aa
Information retrieval,Linux,C/C ,Data structure
展开
-
TCP Three Way Handshake
The TCP three way handshake is the process for establishing a TCP connection. A TCP connection is established as shown in the below example. In this example, we assume a client computer is contacting a server to send it some information.1.The client sends转载 2011-05-07 11:41:00 · 990 阅读 · 1 评论 -
strncpy&snprintf用法之比较
strncpy的正确用法:strncpy(dest, src, sizeof(dest));dest[sizeof(dest)-1] = ‘\0’;snprintf的正确用法:snprintf(dest, sizeof(dest), "%s", src);strncpy的问题:size一定要用sizeof(dest)或sizeof(dest)-1,不可误转载 2011-11-09 22:11:50 · 949 阅读 · 0 评论