Library: UPnP/SOAP
Package: SOAP
Header: Poco/UPnP/SOAP/Transport.h
The Transport implementation for UPnP SOAP.
This Transport implementation provides SOAP support for UPnP device control.
Direct Base Classes: Poco::RemotingNG::Transport
All Base Classes: Poco::RefCountedObject, Poco::RemotingNG::AttributedObject, Poco::RemotingNG::Transport
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, connect, connected, disconnect, duplicate, endPoint, endRequest, getAttribute, hasAttribute, referenceCount, release, sendMessage, sendRequest, setAttribute
Transport(
bool keepAlive = false
);
Creates a Transport.
If keepAlive is true, enables HTTP 1.1 persistent connections for this Transport connection.
~Transport();
Destroys the Transport.
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
);
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
);
void connect(
const std::string & endPoint
);
See also: Poco::RemotingNG::Transport::connect()
bool connected() const;
See also: Poco::RemotingNG::Transport::connected()
void disconnect();
const std::string & endPoint() const;
See also: Poco::RemotingNG::Transport::endPoint()
void endRequest();
bool getChunkedTransferEncoding() const;
Returns true if and only if chunked transfer encoding is enabled, which is the default unless enableChunkedTransferEncoding() has been called.
bool getKeepAlive() const;
Returns true if and only if HTTP/1.1 persistent connections are enabled.
The Transport must be connected, otherwise a Poco::IllegalStateException will be thrown.
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.
Poco::Timespan getTimeout() const;
Returns the HTTP timeout.
The Transport must be connected, otherwise a Poco::IllegalStateException will be thrown.
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.
void sendMessage(
const Poco::RemotingNG::Identifiable::ObjectId & oid,
const Poco::RemotingNG::Identifiable::TypeId & tid,
const std::string & messageName,
Poco::RemotingNG::SerializerBase::MessageType messageType
);
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
);
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.
void setKeepAlive(
bool enable
);
Enables or disables HTTP/1.1 persistent connections.
The Transport must be connected, otherwise a Poco::IllegalStateException will be thrown.
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.
void setTimeout(
const Poco::Timespan & timeout
);
Sets the HTTP timeout.
The Transport must be connected, otherwise a Poco::IllegalStateException will be thrown.
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.
void prepareRequest(
Poco::Net::HTTPRequest & request,
const std::string & messageName
);
const Poco::Net::HTTPClientSession & requireSession() const;
Poco::Net::HTTPClientSession & requireSession();
static const std::string PROTOCOL;
static const std::string CONTENT_TYPE;
static const std::string SOAPACTION;
static const std::string USER_AGENT;