# SimpleUdpStreamProvider.hpp

This File On Github
Ask A Question

API: latest
module: oatpp-ssdp
#include "oatpp-ssdp/SimpleUdpStreamProvider.hpp"

# SimpleUdpStreamProvider

Simple implementation of provider of UDP streams.

namespace oatpp { namespace ssdp { 
  class SimpleUdpStreamProvider : public network::ServerConnectionProvider {}
}}

# Methods

Return Type Name Summary
explicit SimpleUdpStreamProvider Constructor.
void stop Close accept-socket.
provider::ResourceHandle<data::stream::IOStream> get Get incoming connection.
async::CoroutineStarterForResult<const provider::ResourceHandle<data::stream::IOStream>&> getAsync No need to implement this.

# SimpleUdpStreamProvider::SimpleUdpStreamProvider

Constructor.

  • @param port

explicit SimpleUdpStreamProvider(v_uint16 port)

# SimpleUdpStreamProvider::stop

Close accept-socket.

void stop() override

# SimpleUdpStreamProvider::get

Get incoming connection.

provider::ResourceHandle<data::stream::IOStream> get() override

# SimpleUdpStreamProvider::getAsync

No need to implement this.
For Asynchronous IO in oatpp it is considered to be a good practice to accept connections in a seperate thread with the blocking accept() and then process connections in Asynchronous manner with non-blocking read/write.
It may be implemented later

async::CoroutineStarterForResult<const provider::ResourceHandle<data::stream::IOStream>&> getAsync() override