ns-allinone-2.35/tcp/tcp-full.cc
void
FullTcpAgent::sendmsg(int nbytes, const char *flags)
{
	if (flags && strcmp(flags, "MSG_EOF") == 0) 
		close_on_empty_ = TRUE;	
	if (flags && strcmp(flags, "DAT_EOF") == 0) 
		signal_on_empty_ = TRUE;	

	if (nbytes == -1) {
		infinite_send_ = TRUE;
		advance_bytes(0);
	} else
		advance_bytes(nbytes);
}
/*
 * If MSG_EOF is set, by setting close_on_empty_ to TRUE, we ensure that
 * a FIN will be sent when the send buffer emptys.
 * If DAT_EOF is set, the callback function done_data is called
 * when the send buffer empty
 * 
 * When (in the future?) FullTcpAgent implements T/TCP, avoidance of 3-way 
 * handshake can be handled in this function.
 */
If MSG_EOF is set, by setting close_on_empty_ to TRUE, we ensure that
a FIN will be sent when the send buffer emptys.
If DAT_EOF is set, the callback function done_data is called
when the send buffer empty

When (in the future?) FullTcpAgent implements T/TCP, avoidance of 3-way
handshake can be handled in this function.
If MSG_EOF is set by setting close_on_empty_ to TRUE we ensure that a FIN will be sent when the send buffer emptys . If DAT_EOF is set the callback function done_data is called when the send buffer empty When ( in the future? ) FullTcpAgent implements T / TCP avoidance of 3 - way handshake can be handled in this function .
void
FullTcpAgent::sendmsg(int nbytes, const char *flags)
{
	if (flags && strcmp(flags, "MSG_EOF") == 0) 
		close_on_empty_ = TRUE;	
	if (flags && strcmp(flags, "DAT_EOF") == 0) 
		signal_on_empty_ = TRUE;	
	if (nbytes == -1) {
		infinite_send_ = TRUE;
		advance_bytes(0);
	} else
		advance_bytes(nbytes);
}
void FullTcpAgent :: sendmsg ( int nbytes , const char * flags ) { if ( flags && strcmp ( flags , " " ) == 0 ) close_on_empty_ = TRUE ; if ( flags && strcmp ( flags , " " ) == 0 ) signal_on_empty_ = TRUE ; if ( nbytes == -1 ) { infinite_send_ = TRUE ; advance_bytes ( 0 ) ; } else advance_bytes ( nbytes ) ; }
If MSG_EOF is set, by setting close_on_empty_ to TRUE, we ensure that
 a FIN will be sent when the send buffer emptys.
If MSG_EOF is set by setting close_on_empty_ to TRUE we ensure that a FIN will be sent when the send buffer emptys .