Connector.hpp

This File On Github
Ask A Question

API: latest
module: oatpp-websocket
#include "oatpp-websocket/Connector.hpp"

Connector

Helper class to do client websocket connect.

namespace oatpp { namespace websocket { 
  class Connector {}
}}

Typedefs

Type Name Summary
oatpp::data::stream::IOStream Connection Convenience typedef for oatpp::data::stream::IOStream.
oatpp::async::Action Action Convenience typedef for oatpp::async::Action.

Methods

Return Type Name Summary
[none] Connector Constructor.
std::shared_ptr<Connector> createShared Create shared Connector.
std::shared_ptr<Connection> connect Connect to server, do websocket-handshake and return Connection which can be then passed to WebSocket constructor.
CoroutineStarterForResult<const std::shared_ptr<Connection>&> connectAsync Connect to server, do websocket-handshake and return Connection which can be then passed to WebSocket constructor.

Connector::Connection

Convenience typedef for oatpp::data::stream::IOStream.

typedef oatpp::data::stream::IOStream Connection

Connector::Action

Convenience typedef for oatpp::async::Action.

typedef oatpp::async::Action Action

Connector::Connector

Constructor.

Connector(const std::shared_ptr<oatpp::network::ClientConnectionProvider>& connectionProvider)

Connector::createShared

Create shared Connector.

static std::shared_ptr<Connector> createShared(const std::shared_ptr<oatpp::network::ClientConnectionProvider>& connectionProvider)

Connector::connect

Connect to server, do websocket-handshake and return Connection which can be then passed to WebSocket constructor.
(Blocking call)

std::shared_ptr<Connection> connect(const oatpp::String& path)

Connector::connectAsync

Connect to server, do websocket-handshake and return Connection which can be then passed to WebSocket constructor.
(Async call)

CoroutineStarterForResult<const std::shared_ptr<Connection>&> connectAsync(const oatpp::String& path)