클라이언트 socket descripor 만으로.. IP를 얻을수 있을까요?

zeshai의 이미지

로컬이 아니고...

연결된 클라이언트의.. 소켓만으로 다시 주소를 얻어낼 수 있을까요???

struct sockaddr_in 타입이나... char* 형태나...

알쏭달쏭 하네요...

prether의 이미지

getsockname()쓰면 됩니다.

peer의 정보를 알고 싶으면 getpeername()

/***************************************
Being the one is just like being in love.
***************************************/