nntp2http.com
Posting
Suche
Optionen
Hilfe & Kontakt

Re: Ottenere nome simbolico host

Von: gigi (gigi at vattelappesca.it@sistrix.com) [Profil]
Datum: 14.06.2008 15:08
Message-ID: <4853c2d5$0$40307$4fafbaef@reader5.news.tin.it>
Newsgroup: it.comp.os.linux.development
Mariano wrote:
> Quindi in pratica dovrei cmq
> usare getpeername, prendere l'indirizzo ip e metterlo nella struttura,
> e poi passare la struttura alla getnameinfo???

si ma queste cose fai prima a provarle ke a kiederle

cmq dato che sei su tcp
lato client sei tu ke inizi la 3way quindi hai tutte le info
lato server devi fare la accept che ti ritorna cito testualmente:
"sockaddr structure.  This structure is filled  in  with the address of
the peer socket"
quindi hai gli elementi necessari per non dover chiamare la getpeername
tutto dipende da come imposti le tue funzioni/strutture

ciaozzz

[ Auf dieses Posting antworten ]

Antworten