#include "Stroika/Foundation/StroikaPreComp.h"
#include "Stroika/Foundation/Common/Common.h"
#include "Stroika/Foundation/Execution/Synchronized.h"
#include "Stroika/Foundation/IO/Network/ConnectionOrientedStreamSocket.h"
#include "Stroika/Foundation/Streams/InputOutputStream.h"
#include "SocketStream.inl"
Go to the source code of this file.
Namespaces | |
namespace | Stroika::Foundation |
namespace | Stroika::Foundation::IO::Network |
Typedefs | |
using | Stroika::Foundation::IO::Network::SocketStream::Ptr = Streams::InputOutputStream::Ptr< byte > |
Functions | |
Ptr | Stroika::Foundation::IO::Network::SocketStream::New (Execution::InternallySynchronized internallySynchronized, const ConnectionOrientedStreamSocket::Ptr &sd) |
using Stroika::Foundation::IO::Network::SocketStream::Ptr = typedef Streams::InputOutputStream::Ptr<byte> |
A SocketStream wraps a a socket as a InputOutputStream - two separate but related streams.
The only real connection is that they share a common socket, and if it is closed, then the whole SocketStream will stop working.
\note SocketStream adopts its owned ConnectionOrientedStreamSocket, so that a Close () on SocketStream will Close that socket as well. But SocketStream is an InputOutputStream - so you can close the input and output sides separately. If you call close on only one side of the input stream, Shutdown () will be used to shutdown just that end of the stream. Closing both sides of the stream (calling Close on the InputOutputStream) closes both sides and ShutDowns both sides of the socket.
Definition at line 46 of file IO/Network/SocketStream.h.
auto Stroika::Foundation::IO::Network::SocketStream::New | ( | Execution::InternallySynchronized | internallySynchronized, |
const ConnectionOrientedStreamSocket::Ptr & | sd | ||
) |
To copy a SocketStream, use SocketStream<T>::Ptr
Definition at line 146 of file IO/Network/SocketStream.cpp.