随笔分类 -  socket

c socket
Error Handling: Wrapper Functions
摘要:Error Handling: Wrapper Functions In any real-world program, it is essential to check every function call for an error return. In Figure 1.5, we check for errors from socket, inet_pton, connect, read,... 阅读全文

posted @ 2012-04-28 17:40 D_D_U 阅读(332) 评论(0) 推荐(0)

Host Names
摘要:Host Names Besides the standard numbers-and-dots notation for Internet addresses, you can also refer to a host by a symbolic name. The advantage of a symbolic name is that it is usually easier ... 阅读全文

posted @ 2012-04-28 11:07 D_D_U 阅读(315) 评论(0) 推荐(0)

Host Address Data Type
摘要:Host Address Data Type IPv4 Internet host addresses are represented in some contexts as integers (type uint32_t). In other contexts, the integer is packaged inside a structure of type struct in_a... 阅读全文

posted @ 2012-04-28 10:46 D_D_U 阅读(304) 评论(0) 推荐(0)

Byte Order Conversion
摘要:Byte Order Conversion Different kinds of computers use different conventions for the ordering of bytes within a word. Some computers put the most significant byte within a word first (this is ... 阅读全文

posted @ 2012-04-28 10:25 D_D_U 阅读(327) 评论(0) 推荐(0)

Socket Address Structures
摘要:Socket Address Structures Most socket functions require a pointer to a socket address structure as an argument. Each supported protocol suite defines its own socket address structure. The names of th... 阅读全文

posted @ 2012-04-28 10:11 D_D_U 阅读(292) 评论(0) 推荐(0)

导航