If SCTP use SOCK_STREAM, Use BUFFERING method.

Most of the time, an application wants to perform some amount of data buffering
in addition to just responding to events. When we want to write data,
for example, the usual pattern runs something like:

1. Decide that we want to write some data to a connection;
   put that data in a buffer.
2. Wait for the connection to become writable
3. Write as much of the data as we can
4. Remember how much we wrote, and if we still have more data to write,
   wait for the connection to become writable again.

Now, Open5GS implements the above method by default when transmitting data
in a stream type socket.
This commit is contained in:
Sukchan Lee
2020-11-11 13:21:32 -05:00
parent 9a1824f6aa
commit 6f11a78079
18 changed files with 283 additions and 173 deletions

View File

@@ -124,6 +124,12 @@ void ogs_pollset_remove(ogs_poll_t *poll)
ogs_pool_free(&pollset->pool, poll);
}
ogs_poll_t *ogs_pollset_cycle(ogs_pollset_t *pollset, ogs_poll_t *poll)
{
ogs_assert(pollset);
return ogs_pool_cycle(&pollset->pool, poll);
}
void *ogs_pollset_self_handler_data(void)
{
return &self_handler_data;