X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=network.h;h=45742073954c8e5f1b41911523eb82f07dbdba2f;hb=0047bbe70fc4d0df7b5f0057971071c348aff018;hp=46ec6bb746f987531248a9153e9380d61a60f83a;hpb=8a91a0516f435b6210adae2381a0dbac31dde0e8;p=PuTTY.git diff --git a/network.h b/network.h index 46ec6bb7..45742073 100644 --- a/network.h +++ b/network.h @@ -75,20 +75,23 @@ struct plug_function_table { }; /* proxy indirection layer */ +/* NB, control of 'addr' is passed via new_connection, which takes + * responsibility for freeing it */ Socket new_connection(SockAddr addr, char *hostname, int port, int privport, - int oobinline, int nodelay, Plug plug, - const Config *cfg); + int oobinline, int nodelay, int keepalive, + Plug plug, const Config *cfg); Socket new_listener(char *srcaddr, int port, Plug plug, int local_host_only, const Config *cfg); SockAddr name_lookup(char *host, int port, char **canonicalname, const Config *cfg); /* platform-dependent callback from new_connection() */ +/* (same caveat about addr as new_connection()) */ Socket platform_new_connection(SockAddr addr, char *hostname, int port, int privport, - int oobinline, int nodelay, Plug plug, - const Config *cfg); + int oobinline, int nodelay, int keepalive, + Plug plug, const Config *cfg); /* socket functions */ @@ -105,8 +108,10 @@ int sk_addrtype(SockAddr addr); void sk_addrcopy(SockAddr addr, char *buf); void sk_addr_free(SockAddr addr); +/* NB, control of 'addr' is passed via sk_new, which takes responsibility + * for freeing it, as for new_connection() */ Socket sk_new(SockAddr addr, int port, int privport, int oobinline, - int nodelay, Plug p); + int nodelay, int keepalive, Plug p); Socket sk_newlistener(char *srcaddr, int port, Plug plug, int local_host_only);