X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=sockadv.tex;h=b6ee0ca013f455e4679e63fc28c4926e64936323;hp=505ebb3da8102728f7d8a30cdee72cb1449a7e36;hb=b38fb9f5c8fb8360f7ac296baa8f4a0bdd692d1c;hpb=5af25bf51719d4f435f57a8d7df64f286ad64996 diff --git a/sockadv.tex b/sockadv.tex index 505ebb3..b6ee0ca 100644 --- a/sockadv.tex +++ b/sockadv.tex @@ -1,9 +1,9 @@ %% sockadv.tex %% -%% Copyright (C) 2004 Simone Piccardi. Permission is granted to +%% Copyright (C) 2004-2005 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the -%% Free Software Foundation; with the Invariant Sections being "Prefazione", +%% Free Software Foundation; with the Invariant Sections being "Un preambolo", %% with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the %% license is included in the section entitled "GNU Free Documentation %% License". @@ -13,16 +13,54 @@ Esamineremo in questo capitolo le funzionalità più evolute della gestione dei socket TCP, come l'uso del I/O multiplexing (trattato in -\secref{sec:file_multiplexing}) con i socket, l'uso delle opzioni dei socket e -la gestione dei dati urgenti e \textit{out-of-band}. +sez.~\ref{sec:file_multiplexing}) con i socket, l'uso delle opzioni dei socket +e la gestione dei dati urgenti e \textit{out-of-band}. + + + +\section{Le funzioni di I/O avanzate} +\label{sec:sock_advanced_IO} + +Trattereno in questa sezione le funzioni di I/O più avanzate che permettono di +controllare le funzionalità specifiche della comunicazione dei dati che sono +disponibili con i vari tipi di socket. + + +\subsection{I messaggi ancillari} +\label{sec:TCP_ancillary_data} + + + + +Quanto è stata attivata l'opzione \const{IP\_RECVERR} il kernel attiva per il +socket una speciale coda su cui vengono inviati tutti gli errori riscontrati. +Questi possono essere riletti usando il flag \const{MSG\_ERRQUEUE}, nel qual +caso sarà passato come messaggio ancillare una struttura di tipo +\struct{sock\_extended\_err} illustrata in +fig.~\ref{fig:sock_extended_err_struct}. + + +\begin{figure}[!htb] + \footnotesize \centering + \begin{minipage}[c]{15cm} + \includestruct{listati/sock_extended_err.h} + \end{minipage} + \caption{La struttura \structd{sock\_extended\_err} usata dall'opzione + \const{IP\_RECVERR} per ottenere le informazioni relative agli errori su + un socket.} + \label{fig:sock_extended_err_struct} +\end{figure} + + + + + + + -\section{Socket TCP avanzati} -\label{sec:TCP_advanced_socket} -Trattereno in questa sezione alcune delle funzionalità più avanzate relative -ai socket TCP. Da fare @@ -33,11 +71,13 @@ Una caratteristica speciale dei socket TCP cosiddetti dati \textit{out-of-band} ... -\section{Socket UDP avanzati} -\label{sec:UDP_advanced_socket} +\section{L'uso dell'I/O non bloccante} +\label{sec:sock_noblok_IO} + +Trattereno in questa sezione le modalità avanzate che permettono di utilizzare +i socket con una comunicazione non bloccante, in modo da + -Trattereno in questa sezione alcune delle funzionalità più avanzate relative -ai socket UDP. Da fare