C 言語関数:getpeername サンプルコード

サンプルコードを検索した結果です。


TITLE : Safari | Linux Socket Programming by Example -> Obtaining the Socket Address
The function to do this is called getpeername(2). This function will be useful to you when you start examining and writing server code. It is introduced here because it is so similar to getsockname(2). The function synopsis for getpeername(2) is as follows:.......
http://alas.matf.bg.ac.rs/manuals/lspe/snode=48.html


TITLE : Safari | Linux Socket Programming by Example -> Obtaining the Socket Address
int getpeername(int s, struct sockaddr *name, socklen_t *namelen);.......
http://alas.matf.bg.ac.rs/manuals/lspe/snode=48.html
TITLE : Safari | Linux Socket Programming by Example -> Obtaining the Socket Address
Listing 5.3 shows some code that defines a function named peer_addr(). This code is very similar in design to the sock_addr() function of Listing 5.2. This is not a complete example, however, because it shows the source code only for the function itself (it lacks a main program). This code can be revisited later in this book, when connection-oriented communications are discussed. For now, simply appreciate it as an example of how the function getpeername(2) can be used........
http://alas.matf.bg.ac.rs/manuals/lspe/snode=48.html
TITLE : Safari | Linux Socket Programming by Example -> Obtaining the Socket Address
Example 5.3. getpeer.c—The getpeername(2) Function.......
http://alas.matf.bg.ac.rs/manuals/lspe/snode=48.html
TITLE : Safari | Linux Socket Programming by Example -> Obtaining the Socket Address
3: * Demonstrate getpeername(2):.......
http://alas.matf.bg.ac.rs/manuals/lspe/snode=48.html
TITLE : Safari | Linux Socket Programming by Example -> Obtaining the Socket Address
35: z = getpeername(s,.......
http://alas.matf.bg.ac.rs/manuals/lspe/snode=48.html
TITLE : Safari | Linux Socket Programming by Example -> Obtaining the Socket Address
The getpeername(2) function is called in line 35. If successful, z will be set to zero, and the address will be loaded into the structure adr_inet. The length variable len_inet will be overwritten with the actual size used........
http://alas.matf.bg.ac.rs/manuals/lspe/snode=48.html
TITLE : Safari | Linux Socket Programming by Example -> Obtaining the Socket Address
getpeername(2) function.......
http://alas.matf.bg.ac.rs/manuals/lspe/snode=48.html
TITLE : Safari | Linux Socket Programming by Example -> Obtaining the Socket Address
getpeername(2).......
http://alas.matf.bg.ac.rs/manuals/lspe/snode=48.html
TITLE : Safari | Linux Socket Programming by Example -> Obtaining the Socket Address
getpeername(2) function.......
http://alas.matf.bg.ac.rs/manuals/lspe/snode=48.html
TITLE : getpeername()
getpeername().......
http://beej.us/guide/bgnet/output/html/multipage/getpeernameman.html
TITLE : getpeername()
int getpeername(int s, struct sockaddr *addr, socklen_t *len);.......
http://beej.us/guide/bgnet/output/html/multipage/getpeernameman.html
TITLE : getpeername()
getpeername() simply returns a struct sockaddr_in filled with information about the machine you're connected to........
http://beej.us/guide/bgnet/output/html/multipage/getpeernameman.html
TITLE : getpeername()
getpeername(s, (struct sockaddr*)&addr, &len);.......
http://beej.us/guide/bgnet/output/html/multipage/getpeernameman.html
Googleで検索

https://www.google.co.jp/#q=getpeername