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/sktexm.c File Reference


Detailed Description

Socket example program (multiple clients) [Sec. 8.1.3].

Definition in file sktexm.c.

Go to the source code of this file.

Defines

#define SOCKETNAME   "MySocket"

Functions

bool run_server (struct sockaddr_un *sap)
bool run_client (struct sockaddr_un *sap)
int main (void)


Define Documentation

#define SOCKETNAME   "MySocket"
 

Definition at line 103 of file sktexm.c.


Function Documentation

int main void   ) 
 

Definition at line 105 of file sktexm.c.

References EC_CLEANUP_BGN, EC_CLEANUP_END, ec_false, exit(), run_client(), run_server(), SOCKETNAME, sockaddr_un::sun_family, sockaddr_un::sun_path, and unlink().

bool run_client struct sockaddr_un sap  )  [static]
 

Definition at line 73 of file sktexm.c.

References close(), connect(), EC_CLEANUP_BGN, EC_CLEANUP_END, EC_FAIL, ec_neg1, errno, exit(), fork(), getpid(), read(), sleep(), socket(), and write().

Referenced by main().

bool run_server struct sockaddr_un sap  )  [static]
 

Definition at line 25 of file sktexm.c.

References accept(), bind(), close(), EC_CLEANUP_BGN, EC_CLEANUP_END, ec_neg1, FD_CLR(), FD_ISSET(), FD_SET(), FD_ZERO(), listen(), read(), select(), set(), socket(), and write().


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