Poco::UPnP::SOAP

class Transport

File Information

Library: UPnP/SOAP
Package: SOAP
Header: Poco/UPnP/SOAP/Transport.h

Description

The Transport implementation for UPnP SOAP.

This Transport implementation provides SOAP support for UPnP device control.

Inheritance

Direct Base Classes: Poco::RemotingNG::Transport

All Base Classes: Poco::RefCountedObject, Poco::RemotingNG::AttributedObject, Poco::RemotingNG::Transport

Member Summary

Member Functions: beginMessage, beginRequest, connect, connected, disconnect, endPoint, endRequest, getChunkedTransferEncoding, getKeepAlive, getKeepAliveTimeout, getTimeout, getUserAgent, prepareRequest, requireSession, sendMessage, sendRequest, setChunkedTransferEncoding, setKeepAlive, setKeepAliveTimeout, setTimeout, setUserAgent

Inherited Functions: beginMessage, beginRequest, clearAttributes, connect, connected, countAttributes, disconnect, duplicate, endPoint, endRequest, enumerateAttributes, getAttribute, hasAttribute, lock, operator =, referenceCount, release, removeAttribute, sendMessage, sendRequest, setAttribute, unlock

Constructors

Transport

Transport(
    bool keepAlive = false
);

Creates a Transport.

If keepAlive is true, enables HTTP 1.1 persistent connections for this Transport connection.

Destructor

~Transport virtual

~Transport();

Destroys the Transport.

Member Functions

beginMessage

Poco::RemotingNG::Serializer & beginMessage(
    const Poco::RemotingNG::Identifiable::ObjectId & oid,
    const Poco::RemotingNG::Identifiable::TypeId & tid,
    const std::string & messageName,
    Poco::RemotingNG::SerializerBase::MessageType messageType
);

beginRequest

Poco::RemotingNG::Serializer & beginRequest(
    const Poco::RemotingNG::Identifiable::ObjectId & oid,
    const Poco::RemotingNG::Identifiable::TypeId & tid,
    const std::string & messageName,
    Poco::RemotingNG::SerializerBase::MessageType messageType
);

connect virtual

void connect(
    const std::string & endPoint
);

connected virtual

bool connected() const;

disconnect virtual

void disconnect();

endPoint virtual

const std::string & endPoint() const;

endRequest virtual

void endRequest();

getChunkedTransferEncoding

bool getChunkedTransferEncoding() const;

Returns true iff chunked transfer encoding is enabled, which is the default unless enableChunkedTransferEncoding() has been called.

getKeepAlive

bool getKeepAlive() const;

Returns true iff HTTP/1.1 persistent connections are enabled.

The Transport must be connected, otherwise a Poco::IllegalStateException will be thrown.

getKeepAliveTimeout

Poco::Timespan getKeepAliveTimeout() const;

Returns the timeout for HTTP/1.1 persistent connections.

The Transport must be connected, otherwise a Poco::IllegalStateException will be thrown.

getTimeout

Poco::Timespan getTimeout() const;

Returns the HTTP timeout.

The Transport must be connected, otherwise a Poco::IllegalStateException will be thrown.

getUserAgent

const std::string & getUserAgent() const;

Returns the value of the User-Agent header sent with UPnP SOAP requests, or an empty string if no User-Agent value has been set.

sendMessage

void sendMessage(
    const Poco::RemotingNG::Identifiable::ObjectId & oid,
    const Poco::RemotingNG::Identifiable::TypeId & tid,
    const std::string & messageName,
    Poco::RemotingNG::SerializerBase::MessageType messageType
);

sendRequest

Poco::RemotingNG::Deserializer & sendRequest(
    const Poco::RemotingNG::Identifiable::ObjectId & oid,
    const Poco::RemotingNG::Identifiable::TypeId & tid,
    const std::string & messageName,
    Poco::RemotingNG::SerializerBase::MessageType messageType
);

setChunkedTransferEncoding

void setChunkedTransferEncoding(
    bool enable = true
);

Enables or disables chunked transfer encoding for HTTP requests. This is normally enabled. However, some poorly implemented UPnP stacks cannot handle chunked HTTP messages.

setKeepAlive

void setKeepAlive(
    bool enable
);

Enables or disables HTTP/1.1 persistent connections.

The Transport must be connected, otherwise a Poco::IllegalStateException will be thrown.

setKeepAliveTimeout

void setKeepAliveTimeout(
    const Poco::Timespan & timeout
);

Sets the timeout for HTTP/1.1 persistent connections.

The Transport must be connected, otherwise a Poco::IllegalStateException will be thrown.

setTimeout

void setTimeout(
    const Poco::Timespan & timeout
);

Sets the HTTP timeout.

The Transport must be connected, otherwise a Poco::IllegalStateException will be thrown.

setUserAgent

void setUserAgent(
    const std::string & userAgent
);

Sets the value of the User-Agent header sent with UPnP SOAP requests. If an empty string is given (default), no User-Agent header is included in the request.

prepareRequest protected

void prepareRequest(
    Poco::Net::HTTPRequest & request,
    const std::string & messageName
);

requireSession protected

const Poco::Net::HTTPClientSession & requireSession() const;

requireSession protected

Poco::Net::HTTPClientSession & requireSession();

Variables

PROTOCOL static

static const std::string PROTOCOL;

CONTENT_TYPE protected static

static const std::string CONTENT_TYPE;

SOAPACTION protected static

static const std::string SOAPACTION;

USER_AGENT protected static

static const std::string USER_AGENT;

Securely control IoT edge devices from anywhere   Connect a Device