File Information
Library: UPnP/SOAP
Package: SOAP
Header: Poco/UPnP/SOAP/Transport.h
Description
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
);
Destructor
~Transport
~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
void connect(
const std::string & endPoint
);
See also: Poco::RemotingNG::Transport::connect()
connected
bool connected() const;
See also: Poco::RemotingNG::Transport::connected()
disconnect
void disconnect();
endPoint
const std::string & endPoint() const;
See also: Poco::RemotingNG::Transport::endPoint()
endRequest
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
void prepareRequest(
Poco::Net::HTTPRequest & request,
const std::string & messageName
);
requireSession
const Poco::Net::HTTPClientSession & requireSession() const;
requireSession
Poco::Net::HTTPClientSession & requireSession();
Variables
PROTOCOL
static const std::string PROTOCOL;
CONTENT_TYPE
static const std::string CONTENT_TYPE;
SOAPACTION
static const std::string SOAPACTION;
USER_AGENT
static const std::string USER_AGENT;