Atlas  0.7.0
Networking protocol for the Worldforge system.
Atlas::Net::StreamAccept Class Reference

#include <Stream.h>

Inheritance diagram for Atlas::Net::StreamAccept:
Collaboration diagram for Atlas::Net::StreamAccept:

Public Types

enum  State { IN_PROGRESS , SUCCEEDED , FAILED }
 

Public Member Functions

 StreamAccept (std::string name, std::istream &inStream, std::ostream &outStream)
 
void poll () override
 
State getState () override
 
std::unique_ptr< Atlas::CodecgetCodec (Atlas::Bridge &) override
 FIXME We should pass in the Bridge here, not at construction time. More...
 

Detailed Description

Negotiation of servers accepting a connection from a remote system.

Used once a stream connection has been established by a client. This class listens to the list of Atlas::Codec types that the client offers, and then responds with the name of the Atlas::Codec which it thinks is most suitable. Once the server has told the client which Atlas::Codec to use, negotiation is flagged as complete, and this object can be deleted.

Definition at line 120 of file Stream.h.

Member Function Documentation

◆ getCodec()

std::unique_ptr< Atlas::Codec > Atlas::Net::StreamAccept::getCodec ( Atlas::Bridge bridge)
overridevirtual

FIXME We should pass in the Bridge here, not at construction time.

Implements Atlas::Negotiate.

Definition at line 345 of file Stream.cpp.


The documentation for this class was generated from the following files: