Send two ordered messages.
@@ -399,7 +399,7 @@ main(void)
exit(EXIT_FAILURE);
}
printf("Change send socket buffer size from %d ", cur_buf_size);
- snd_buf_size = 1<<20; /* 1 MB */
+ snd_buf_size = 1<<22; /* 4 MB */
if (usrsctp_setsockopt(s_c, SOL_SOCKET, SO_SNDBUF, &snd_buf_size, sizeof(int)) < 0) {
perror("usrsctp_setsockopt");
exit(EXIT_FAILURE);
@@ -495,6 +495,12 @@ main(void)
perror("usrsctp_sendv");
exit(EXIT_FAILURE);
}
+ /* Send a 1 MB ordered message */
+ if (usrsctp_sendv(s_c, line, LINE_LENGTH, NULL, 0, (void *)&sndinfo,
+ (socklen_t)sizeof(struct sctp_sndinfo), SCTP_SENDV_SNDINFO, 0) < 0) {
+ perror("usrsctp_sendv");
+ exit(EXIT_FAILURE);
+ }
free(line);
usrsctp_shutdown(s_c, SHUT_WR);
