nopoll_bool nopoll_msg_is_final ( noPollMsg msg)

Allows to get if the provided message reference has FIN flag on (or off) to indicate if it is a final frame.

When a series of messages are received and they conform together a single message, the last message is flagged with FIN = 1 while the rest before go with FIN = 0.

For example, if a user level application is splitted into 4 frame fragments, then the WebSocket peer will receive 3 fragments with FIN = 0 and the last fragment with FIN = 1.

You can use nopoll_msg_is_fragment to know if a particular message was produced due to a fragmentation found at the network level. This happens when the entire frame wasn't sent or it couldn't be read entirely. In the example before, the four frames will be also flagged as fragments too.

msgThe message that is being checked for FIN flag.
nopoll_true if the message is a final one, otherwise nopoll_false is returned. The function returns nopoll_false when message reference received is NULL.

References nopoll_false.