🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #18512

Re: Sockets.

#18512
From: Ignacio Arenaza
Date: Thu, 26 Aug 1999 00:00
15 lines
1001 bytes
>>>>> "Switch" == Switch  <fros@bitel.es> writes:

    Switch> desde el que se conecta es v�lido.  �Como saco yo un array
    Switch> de caracteres que contenga la direcci�n IP del cliente a
    Switch> partir del identificador de socket?  La conexi�n se acepta

Echa una ojeada a la funcion getpeername(2). Esto te devuelve la IP
del host al otro extremo, asi que luego usas gethostbyname/gethostbyaddr 
en funcion de lo que desees y listo.

Saludos. I�aki.

-- 
  PGP Key available at http://personales.jet.es/inaki.arenaza/pgpkey.html
  Linux Registered User #44369
Technical Details
Message-ID: <87aere1u64.fsf@eb2ebu.ampr.org>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7q33s5$j1g$1@talia.mad.ttd.net>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,6ff6beb816085589
X-Google-Attributes: gidf86c8,public
From: Ignacio Arenaza <inaki.arenaza@jet.es>
Subject: Re: Sockets.
Date: 1999/08/26
Message-ID: <87aere1u64.fsf@eb2ebu.ampr.org>
X-Deja-AN: 517724237
References: <7q33s5$j1g$1@talia.mad.ttd.net>
Organization: Servidor NNTP de eb2ebu.ampr.org
Newsgroups: es.comp.os.linux.programacion