Skip to content

Commit

Permalink
Fixed correct description for msgttl (Haivision#847)
Browse files Browse the repository at this point in the history
* Fixed correct description for msgttl
  • Loading branch information
ethouris authored and rndi committed Sep 13, 2019
1 parent 57b75b3 commit 908e42f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions docs/API-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ The `SRT_MSGCTRL` structure:
typedef struct SRT_MsgCtrl_
{
int flags; // Left for future
int msgttl; // TTL for a message, default -1 (delivered always)
int msgttl; // TTL for a message, default -1 (no TTL limitation)
int inorder; // Whether a message is allowed to supersede partially lost one. Unused in stream and live mode.
int boundary; //0:mid pkt, 1(01b):end of frame, 2(11b):complete frame, 3(10b): start of frame
uint64_t srctime; // source timestamp (usec), 0: use internal time
Expand All @@ -575,13 +575,13 @@ intended to specify some special options controlling the details of how the
called function should work.

* `msgttl`: [IN]. In **message** and **live mode** only, specifies the TTL for
sending messages (in `[ms]`). Not used for receiving messages. A packet is
scheduled for sending by this call and then waits in the sender buffer to be
picked up at the moment when all previously scheduled data are already sent,
which may be blocked when the data are scheduled faster than the network can
afford to send. Default -1 means to wait indefinitely. If specified, then the
packet waits for an opportunity to be sent over the network only up to this TTL,
and then, if still not sent, the packet is discarded.
sending messages (in `[ms]`). Not used for receiving messages. If this value
is not negative, it defines the maximum time up to which this message should
stay scheduled for sending for the sake of later retransmission. A message
is always sent for the first time, but the UDP packet carrying it may be
(also partially) lost, and if so, lacking packets will be retransmitted. If
the message is not successfully resent before TTL expires, further retransmission
is given up and the message is discarded.

* `inorder`: [IN]. In **message mode** only, specifies that sent messages should
be extracted by the receiver in the order of sending. This can be meaningful if
Expand Down Expand Up @@ -636,7 +636,7 @@ Sends a payload to a remote party over a given socket.
* `u`: Socket used to send. The socket must be connected for this operation.
* `buf`: Points to the buffer containing the payload to send.
* `len`: Size of the payload specified in `buf`.
* `ttl`: Time (in `[ms]`) to wait for a possibility to send. See description of
* `ttl`: Time (in `[ms]`) to wait for a successful delivery. See description of
the [`SRT_MSGCTRL::msgttl`](#SRT_MSGCTRL) field.
* `inorder`: Required to be received in the order of sending. See
[`SRT_MSGCTRL::inorder`](#SRT_MSGCTRL).
Expand Down
2 changes: 1 addition & 1 deletion docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ following interpretation (except `flags` and `boundary` that are reserved for
future use and should be 0):

* `srt_sendmsg2`:
* msgttl: [IN] maximum time (in ms) to wait in sending buffer before being sent (-1 if unused)
* msgttl: [IN] maximum time (in ms) to wait for successful delivery (-1: indefinitely)
* inorder: [IN] if false, the later sent message is allowed to be delivered earlier
* srctime: [IN] timestamp to be used for sending (0 if current time)
* pktseq: unused
Expand Down
2 changes: 1 addition & 1 deletion srtcore/srt.h
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ SRT_API int srt_setsockflag (SRTSOCKET u, SRT_SOCKOPT opt, const void* op
typedef struct SRT_MsgCtrl_
{
int flags; // Left for future
int msgttl; // TTL for a message, default -1 (delivered always)
int msgttl; // TTL for a message, default -1 (no TTL limitation)
int inorder; // Whether a message is allowed to supersede partially lost one. Unused in stream and live mode.
int boundary; // 0:mid pkt, 1(01b):end of frame, 2(11b):complete frame, 3(10b): start of frame
uint64_t srctime; // source timestamp (usec), 0: use internal time
Expand Down

0 comments on commit 908e42f

Please sign in to comment.