Q: Get info for Common Log Format from socket in C I want to create a log file for my webserver written in C under UNIX.
The logfile should be formatted according to Common Log Format, but I don't know how to get the ident and authuser from the connecting socket.
Is there a simple way to get these from the socket?

A: User name is not an attribute of socket - you need to get it from HTTP request, so sockets API can't help you on this.
