See the demos section in openssl-0.9.7d/demos/ssl/serv.cpp. 
This is UNIX oriented answer there is a struct
struct sockaddr_in sa_cli;
that is defined in 
struct sockaddr_in {
        sa_family_t     sin_family;
        in_port_t       sin_port;
        struct  in_addr sin_addr;
        unsigned char   sin_zero[8];
};
/usr/include/netinet/in.h
sd = accept (listen_sd, (struct sockaddr*) &sa_cli, &client_len);
printf ("Connection from %lx, port %x\n",
          sa_cli.sin_addr.s_addr, sa_cli.sin_port);
 
                                        Thanks,

                                                     Mike

>>> [EMAIL PROTECTED] 6/17/2004 3:40:22 AM >>>
Hi,

so the question is: when Server accepts client connection, do he get
IP
address of the client for further correspondence. If not how can I get
IP
address of the client connecting to my server? and if yes from where
can I
print out client IP address?

thankx

MI


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org

User Support Mailing List                    [EMAIL PROTECTED]

Automated List Manager                           [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to