🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Estructuras por socket

#12837
From: J.A. Gutierrez
Date: Mon, 07 May 2001 12:39
27 lines
2000 bytes
cesar m. redondo <cesar.redondo@mad.tecsidel.es> wrote:

: Un consejo, ni intentes mandar en las estructuras algun char* porque ni
: de co�a, pero que ni de co�a te va a funcionar, te lo digo por
: experiencia propia, si tienes una estructura:

	no es que no vaya a funcionar, funciona perfectamente; lo
	que pasa es que no tiene sentido.

: typedef struct{
:         int A;
:         double B;
:         char* D;
:         struct timeval C;
: }MyStruct;

	Estas pasando una direccion de memoria que (se supone)
	apunta a una cadena del proceso cliente al servidor, en
	el que esa misma posicion de memoria a saber a donde apunta.

	Si quieres pasar una cadena, envia un char D[256];

-- 
PGP and other useless info at      \
http://www.cps.unizar.es/~spd/      \
finger://daphne.cps.unizar.es/spd    \       Timeo Danaos et dona ferentes
ftp://ivo.cps.unizar.es/pub/          \                         (Virgilio)   
Technical Details
Message-ID: <9d652a$aoj$1@news.unizar.es>
Path: arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!193.251.151.101!opentransit.net!jussieu.fr!news.rediris.es!news.unizar.es!not-for-mail
References: <3AF3F290.1030009@wanadoo.es> <874ruzsvb6.fsf@relativistic.homeip.net> <3AF64BC4.B737246B@mad.tecsidel.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,5fd35ee70e813e32
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2001-05-07 05:19:31 PST
Path: arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!193.251.151.101!opentransit.net!jussieu.fr!news.rediris.es!news.unizar.es!not-for-mail
From: "J.A. Gutierrez" <spd@daphne.cps.unizar.es>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Estructuras por socket
Date: 7 May 2001 12:39:38 GMT
Organization: Rank
Lines: 27
Message-ID: <9d652a$aoj$1@news.unizar.es>
References: <3AF3F290.1030009@wanadoo.es> <874ruzsvb6.fsf@relativistic.homeip.net> <3AF64BC4.B737246B@mad.tecsidel.es>
NNTP-Posting-Host: daphne.cps.unizar.es
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news.unizar.es 989239178 11027 155.210.152.20 (7 May 2001 12:39:38 GMT)
X-Complaints-To: usenet@news.unizar.es
NNTP-Posting-Date: 7 May 2001 12:39:38 GMT
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (IRIX/6.2 (IP22))