[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Test af TCP server: korrekt h åndtering af read(2)



Michael Rasmussen <sslug@sslug> writes:

> Ovenstående forudsætter, at du kan få modparten til at forstå, at der
> ikke kommer flere data i denne omgang, førend modparten har kvitteret
> for seneste dataforsendelse, og at modparten så også rent faktisk
> efterkommer ønsket.

Netop (sådan cirka, i hvert fald).


> Du kan muligvis fremprovokerer, hvad du ønsker, ved at manipulere med
> størrelsen på SO_RCVBUF. Bemærk dog, at som standard kan denne ikke
> sættes til mindre end 256, men hvis du eksekverer dit program som root,
> kan du sætte en lavere værdi med SO_RCVBUFFORCE.

Det kræver så at jeg kan patche server-koden bare for testens skyld.

Ikke helt umuligt, men lidt ubehagligt da det tilsyneladende skal ske
mellem socket() og listen() ifølge Stevens' Unix Network Programming
(section 7.5).

Det tror jeg ikke mit framework har en hook til, så det bliver lidt
dybt.


Det interessante ville selvfølgelig være hvis jeg tilfældigvis kunne
antage at localhost-forbindelser var smarte(?) og de to buffere i
virkeligheden delte plads. Så kunne jeg nøjes med at kode test-klienten
til at sætte SO_SNDBUF.

//Makholm


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2012-08-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *