Re: read & write interi da socket TCP
Von: ale.ber (ale.beer@gmail.com) [Profil]
Datum: 02.03.2008 17:44
Message-ID: <0b83d5da-4197-4f6c-85c0-b5138163f142@e6g2000prf.googlegroups.com>
Newsgroup: it.comp.os.linux.development
Datum: 02.03.2008 17:44
Message-ID: <0b83d5da-4197-4f6c-85c0-b5138163f142@e6g2000prf.googlegroups.com>
Newsgroup: it.comp.os.linux.development
On 2 Mar, 17:36, Manlio Perillo <manlio_perill...@SPAMlibero.it> wrote: > Il Sun, 02 Mar 2008 08:22:33 -0800, ale.ber ha scritto: > > ..... > > Manlio Perillo Grazie per la segnalazione. Sono d'accordo sul fatto di mettere just_written = write(sock, p + written, sizeof(int) - written); e just_readed = read(sock, p + readed, sizeof(int) - readed); Il controllo inutile l'ho messo per catturare un eventuale EOF in una read, forse nella write è inutile, ma nella read lo lascerei. Per quanto riguarda il byte ordering, cosa ne pensi? Grazie anche a te, siete gentilissimi. Ale[ Auf dieses Posting antworten ]
