2004 by Marc J. Rochkind. All rights reserved. Portions marked "Open Source" may be copied under license.

 

Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

c8/sktexdgmultmsg.c File Reference


Detailed Description

SOCK_DGRAM example program (multiple clients, recvmsg/sendmsg) [Sec. 8.6.3].

Definition in file sktexdgmultmsg.c.

Go to the source code of this file.

Defines

#define SOCKETNAME_SERVER   "SktOne"
#define SOCKETNAME_CLIENT   "SktTwo"
#define MSG_SIZE   100

Functions

void run_client (int nclient)
void run_server (void)
int main (void)

Variables

sockaddr_un sa_server


Define Documentation

#define MSG_SIZE   100
 

Definition at line 35 of file sktexdgmultmsg.c.

#define SOCKETNAME_CLIENT   "SktTwo"
 

Definition at line 31 of file sktexdgmultmsg.c.

#define SOCKETNAME_SERVER   "SktOne"
 

Definition at line 30 of file sktexdgmultmsg.c.


Function Documentation

int main void   ) 
 

Definition at line 110 of file sktexdgmultmsg.c.

References exit(), run_client(), run_server(), sa_server, SOCKETNAME_SERVER, sockaddr_un::sun_family, sockaddr_un::sun_path, and unlink().

void run_client int  nclient  )  [static]
 

Definition at line 37 of file sktexdgmultmsg.c.

References bind(), close(), EC_CLEANUP_BGN, EC_CLEANUP_END, ec_neg1, exit(), fork(), MSG_SIZE, read(), sa_server, sendto(), sleep(), socket(), SOCKETNAME_CLIENT, sockaddr_un::sun_family, sockaddr_un::sun_path, and unlink().

void run_server void   )  [static]
 

Definition at line 75 of file sktexdgmultmsg.c.

References bind(), close(), EC_CLEANUP_BGN, EC_CLEANUP_END, ec_neg1, exit(), iovec::iov_base, iovec::iov_len, msghdr::msg_iov, msghdr::msg_iovlen, msghdr::msg_name, msghdr::msg_namelen, MSG_SIZE, recvmsg(), sa_server, sendmsg(), and socket().


Variable Documentation

struct sockaddr_un sa_server [static]
 

Definition at line 33 of file sktexdgmultmsg.c.

Referenced by main(), run_client(), and run_server().


Generated on Fri Apr 23 10:57:10 2004 for AUP2 Example Source by doxygen 1.3.1