diff options
author | Jose <jose@zeroc.com> | 2014-08-13 22:30:18 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2014-08-13 22:30:18 +0200 |
commit | edd76dbfad6a28c11e441571af493e1eb99ddf52 (patch) | |
tree | 6e8d1045d6e4c60120970468d68b4734e2fee6e0 /cpp/src/Ice/WSAcceptor.cpp | |
parent | - Added back the Ice.BackgroundIO property. (diff) | |
download | ice-edd76dbfad6a28c11e441571af493e1eb99ddf52.tar.bz2 ice-edd76dbfad6a28c11e441571af493e1eb99ddf52.tar.xz ice-edd76dbfad6a28c11e441571af493e1eb99ddf52.zip |
Rename WS transport files for consistency with TCP/UDP transports.
Diffstat (limited to 'cpp/src/Ice/WSAcceptor.cpp')
-rw-r--r-- | cpp/src/Ice/WSAcceptor.cpp | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/cpp/src/Ice/WSAcceptor.cpp b/cpp/src/Ice/WSAcceptor.cpp new file mode 100644 index 00000000000..a6d5f793fc5 --- /dev/null +++ b/cpp/src/Ice/WSAcceptor.cpp @@ -0,0 +1,92 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#include <Ice/WSAcceptor.h> +#include <Ice/WSTransceiver.h> + +using namespace std; +using namespace Ice; +using namespace IceInternal; + +IceInternal::NativeInfoPtr +IceInternal::WSAcceptor::getNativeInfo() +{ + return _delegate->getNativeInfo(); +} + +#if defined(ICE_USE_IOCP) +IceInternal::AsyncInfo* +IceInternal::WSAcceptor::getAsyncInfo(IceInternal::SocketOperation status) +{ + return _delegate->getNativeInfo()->getAsyncInfo(status); +} +#elif defined(ICE_OS_WINRT) +void +IceInternal::WSAcceptor::setCompletedHandler(IceInternal::SocketOperationCompletedHandler^ handler) +{ + _delegate->getNativeInfo()->setCompletedHandler(handler); +} +#endif + +void +IceInternal::WSAcceptor::close() +{ + _delegate->close(); +} + +void +IceInternal::WSAcceptor::listen() +{ + _delegate->listen(); +} + +#if defined(ICE_USE_IOCP) || defined(ICE_OS_WINRT) +void +IceInternal::WSAcceptor::startAccept() +{ + _delegate->startAccept(); +} + +void +IceInternal::WSAcceptor::finishAccept() +{ + _delegate->finishAccept(); +} +#endif + +IceInternal::TransceiverPtr +IceInternal::WSAcceptor::accept() +{ + // + // WebSocket handshaking is performed in TransceiverI::initialize, since + // accept must not block. + // + return new WSTransceiver(_instance, _delegate->accept()); +} + +string +IceInternal::WSAcceptor::protocol() const +{ + return _delegate->protocol(); +} + +string +IceInternal::WSAcceptor::toString() const +{ + return _delegate->toString(); +} + +IceInternal::WSAcceptor::WSAcceptor(const ProtocolInstancePtr& instance, const IceInternal::AcceptorPtr& del) : + _instance(instance), _delegate(del) +{ +} + +IceInternal::WSAcceptor::~WSAcceptor() +{ +} |