Skip to Main Content
Multihomed Communication with SCTP (Stream Control Transmission Protocol)
book

Multihomed Communication with SCTP (Stream Control Transmission Protocol)

by Victor C.M. Leung, Eduardo Parente Ribeiro, Alan Wagner, Janardhan Iyengar
December 2012
Intermediate to advanced content levelIntermediate to advanced
241 pages
7h 14m
English
CRC Press
Content preview from Multihomed Communication with SCTP (Stream Control Transmission Protocol)
i
i
“K16304” 2012/11/19 9:15
i
i
i
i
i
i
198
SCTP Application Interface
{
int result ,n, i;
fd_set read_fd_set , write_fd_set , exception_fd_set ;
struct timeval timeout ;
struct timeval to ;
int msecs = 1;
/ initialise structures for select /
n=0;
FD_ZERO(&read_fd_set );
FD_ZERO(&write_fd_set );
FD_ZERO(&exception_fd_set );
if ( msecs < 0)
{ / select till something comes up /
t o = NULL ;
}
else if (msecs == 0)
{ / poll the fd /
test_dispatch_timer ();
to = &timeout;
timeout . tv_sec = 0;
timeout . tv_usec = 0;
}
else
{ / set the timer /
to = &timeout;
timeout . tv_sec = msecs / 1000;
timeout . tv_usec = (msecs % 1000) 1000;
}
Figure 8.2 test_eventloop function initialization.
The select statement will wait until one of the ledescriptors becomes ready
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Local Networks and the Internet: From Protocols to Interconnection

Local Networks and the Internet: From Protocols to Interconnection

Laurent Toutain, Ana Minaburo
Network Functions Virtualization (NFV) with a Touch of SDN

Network Functions Virtualization (NFV) with a Touch of SDN

Rajendra Chayapathi, Syed Farrukh Hassan, Paresh Shah
LTE Advanced Pro

LTE Advanced Pro

Frédéric Launay, André Perez

Publisher Resources

ISBN: 9781466566996