1 #include <samchon/protocol/ExternalClientArray.hpp> 3 #include <samchon/protocol/ExternalClient.hpp> 6 #include <boost/asio.hpp> 7 #include <samchon/library/XML.hpp> 16 ExternalClientArray::ExternalClientArray()
25 if(xml->hasProperty(
"myIP") ==
true)
26 this->
myIP = xml->getProperty(
"myIP");
30 this->
port = xml->getProperty<
int>(
"port");
55 throw exception(
"invalid factory method");
57 string &ip = socket->remote_endpoint().address().to_string();
58 int port = socket->remote_endpoint().port();
76 if(
myIP.empty() ==
false)
77 xml->setProperty(
"myIP",
myIP);
An interface of a physical server.
An array of ExternalSystem(s).
int port
A port number of an external system.
virtual void addClient(Socket *) override
Handling connection of a physical client.
int port
A port number for accepting external clients.
virtual auto PORT() const -> int
Port number of the server.
A network driver for an external client.
std::string ip
An ip address of an external system.
virtual void start() override
Start interaction.
virtual auto MY_IP() const -> std::string
(optional) Server's IP
virtual auto toXML() const -> std::shared_ptr< library::XML >
Get an XML object represents the EntityGroup.
Package of network protocol and libraries.
std::string myIP
A custom ip address of my system to bind.
virtual void start() override
Start interaction.
virtual void construct(std::shared_ptr< library::XML >) override
Construct data of the Entity from an XML object.
Socket * socket
Socket for network I/O.
XML is a class representing xml object.
virtual void open()
Open the server.
virtual void construct(std::shared_ptr< library::XML > xml)
Construct data of the Entity from an XML object.
virtual auto toXML() const -> std::shared_ptr< library::XML > override
Get an XML object represents the EntityGroup.
virtual auto createChild(std::shared_ptr< library::XML >) -> entity_type *=0
Factory method of a child Entity.