diff --git a/Socket.cpp b/Socket.cpp index 4e21975..05cf652 100644 --- a/Socket.cpp +++ b/Socket.cpp @@ -134,12 +134,12 @@ namespace core { } } - int Socket::write(std::string data) { + int Socket::write(std::string data, Socket *sender) { outlock.lock(); fifo.emplace(data); outlock.unlock(); // coreutils::Log(coreutils::LOG_DEBUG_4) << "inHandler " << descriptor << " " << inHandler << ":" << shutDown << ":[" << data << "]"; - if(!inHandler) + if(!inHandler && sender != this) ePoll.resetSocket(this); return 1; } diff --git a/Socket.h b/Socket.h index bf70108..05734c7 100644 --- a/Socket.h +++ b/Socket.h @@ -86,7 +86,7 @@ namespace core { /// Write data to the socket. /// - int write(std::string data); + int write(std::string data, Socket *sender); void write(char *buffer, int length); void output(std::stringstream &out); diff --git a/Subscription.cpp b/Subscription.cpp index f37a6d5..e553577 100644 --- a/Subscription.cpp +++ b/Subscription.cpp @@ -8,10 +8,10 @@ namespace core Subscription::Subscription(std::string id, std::string mode) : id(id), mode(mode), owner(NULL), handler(NULL) {} - + Subscription::Subscription(std::string id, TCPSession &session, std::string mode) : id(id), mode(mode), owner(&session), handler(NULL) {} - + Subscription::Subscription(std::string id, TCPSession &session, std::string mode, SubscriptionHandler *handler) : id(id), mode(mode), owner(&session), handler(handler) {} @@ -21,7 +21,7 @@ namespace core out << "cancel:" << id << std::endl; for (auto subscriber : subscribers) { - subscriber->write(out.str()); + subscriber->write(out.str(), NULL); } } @@ -62,7 +62,7 @@ namespace core int Subscription::event(std::stringstream &out) { for (auto subscriber = subscribers.begin(); subscriber < subscribers.end(); ++subscriber) - (*subscriber)->write(out.str()); + (*subscriber)->write(out.str(), NULL); return 1; } diff --git a/TCPServer.cpp b/TCPServer.cpp index f2347e5..b50bb8b 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -8,31 +8,31 @@ namespace core { TCPServer::TCPServer(EPoll &ePoll, IPAddress address, std::string delimiter, int depth, std::string text) : TCPSocket(ePoll, text), commands(delimiter, depth) { - + commands.add(subscriptions, "publish"); commands.add(subscriptions, "unpublish"); commands.add(subscriptions, "subscribe"); commands.add(subscriptions, "unsubscribe"); commands.add(subscriptions, "catalog"); commands.add(subscriptions, "event"); - + setDescriptor(socket(AF_INET, SOCK_STREAM, 0)); int yes = 1; setsockopt(getDescriptor(), SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)); - + if(bind(getDescriptor(), address.getPointer(), address.addressLength) < 0) throw coreutils::Exception("Error on bind to socket: " + std::to_string(errno)); - + if(listen(getDescriptor(), 20) < 0) throw coreutils::Exception("Error on listen to socket"); - + } TCPServer::~TCPServer() { coreutils::Log(coreutils::LOG_DEBUG_2) << "Closing server socket " << getDescriptor() << "."; close(getDescriptor()); } - + void TCPServer::onDataReceived(std::string data) { lock.lock(); TCPSession *session = accept(); @@ -40,11 +40,11 @@ namespace core { sessions.push_back(session); lock.unlock(); } - + TCPSession * TCPServer::accept() { - + try { - + TCPSession *session = getSocketAccept(ePoll); session->setDescriptor(::accept(getDescriptor(), (struct sockaddr *)&session->ipAddress.addr, &session->ipAddress.addressLength)); // if(blackList && blackList->contains(session->ipAddress.getClientAddress())) { @@ -67,30 +67,30 @@ namespace core { } return NULL; } - + void TCPServer::removeFromSessionList(TCPSession *session) { std::vector::iterator cursor; lock.lock(); for(cursor = sessions.begin(); cursor < sessions.end(); ++cursor) - if(*cursor == session) { + if(*cursor == session) { sessions.erase(cursor); break; - } + } lock.unlock(); } - + void TCPServer::sessionErrorHandler(std::string errorString, std::stringstream &out) { throw coreutils::Exception(errorString); } - + TCPSession * TCPServer::getSocketAccept(EPoll &ePoll) { return new TCPSession(ePoll, *this); } - + void TCPServer::output(std::stringstream &out) { out << "Use the 'help' command to list the commands for this server." << std::endl; } - + int TCPServer::processCommand(coreutils::ZString &request, TCPSession &session) { int sequence = 0; for(auto *sessionx : sessions) { @@ -100,26 +100,26 @@ namespace core { } return 1; } - + void TCPServer::sendToAll(std::stringstream &data) { for(auto session : sessions) - session->write(data.str()); + session->write(data.str(), NULL); data.str(""); } - + void TCPServer::sendToAll(std::stringstream &data, TCPSession &sender) { for(auto session : sessions) if(session != &sender) - session->write(data.str()); + session->write(data.str(), &sender); data.str(""); } - + void TCPServer::sendToAll(std::stringstream &data, TCPSession &sender, SessionFilter filter) { for(auto session : sessions) if(filter.test(*session)) if(session != &sender) - session->write(data.str()); + session->write(data.str(), &sender); data.str(""); } - + } diff --git a/TCPSession.cpp b/TCPSession.cpp index d9fe0db..2584825 100644 --- a/TCPSession.cpp +++ b/TCPSession.cpp @@ -83,7 +83,7 @@ namespace core { void TCPSession::send() { if(out.tellp() > 0) - write(out.str()); + write(out.str(), this); out.str(""); } diff --git a/TCPSession2.cpp b/TCPSession2.cpp index af272aa..bd17da6 100644 --- a/TCPSession2.cpp +++ b/TCPSession2.cpp @@ -74,7 +74,7 @@ namespace core { void TCPSession2::send() { if(out.tellp() > 0) - TCPSocket::write(out.str()); + TCPSocket::write(out.str(), this); out.str(""); } diff --git a/html/Socket_8h_source.html b/html/Socket_8h_source.html index 925b28f..3435fa3 100644 --- a/html/Socket_8h_source.html +++ b/html/Socket_8h_source.html @@ -99,8 +99,8 @@ $(function() {
83  bool eventReceived(struct epoll_event event, long long eventId);
84 
88 
-
89  int write(std::string data);
-
90  void write(char *buffer, int length);
+
89  int write(std::string data, Socket *sender);
+
90  void write(char *buffer, int length);
91 
92  void output(std::stringstream &out);
93 
@@ -178,11 +178,11 @@ $(function() {
Definition: EPoll.h:31
Definition: Socket.h:34
int getDescriptor()
Get the descriptor for the socket.
Definition: Socket.cpp:44
-
int write(std::string data)
Definition: Socket.cpp:137
bool eventReceived(struct epoll_event event, long long eventId)
Parse epoll event and call specified callbacks.
Definition: Socket.cpp:65
virtual void onRegistered()
Called after the socket has been registered with epoll processing.
Definition: Socket.cpp:59
virtual void receiveData(coreutils::ZString &buffer)
Definition: Socket.cpp:94
Socket(EPoll &ePoll, std::string text="")
Definition: Socket.cpp:11
+
int write(std::string data, Socket *sender)
Definition: Socket.cpp:137
virtual void onRegister()
Called before the socket has registered with the epoll processing.
Definition: Socket.cpp:57
virtual ~Socket()
Definition: Socket.cpp:16
void setDescriptor(int descriptor)
Set the descriptor for the socket.
Definition: Socket.cpp:29
diff --git a/html/classcore_1_1ConsoleServer-members.html b/html/classcore_1_1ConsoleServer-members.html index 6ea9d0b..7590759 100644 --- a/html/classcore_1_1ConsoleServer-members.html +++ b/html/classcore_1_1ConsoleServer-members.html @@ -110,7 +110,7 @@ $(function() { TCPSocket(EPoll &ePoll) (defined in core::TCPSocket)core::TCPSocket TCPSocket(EPoll &ePoll, std::string text) (defined in core::TCPSocket)core::TCPSocket whiteListcore::TCPServer - write(std::string data)core::Socket + write(std::string data, Socket *sender)core::Socket write(char *buffer, int length) (defined in core::Socket)core::Socket ~Socket()core::Socketvirtual ~TCPServer()core::TCPServervirtual diff --git a/html/classcore_1_1ConsoleServer.html b/html/classcore_1_1ConsoleServer.html index 61246b0..ba899ff 100644 --- a/html/classcore_1_1ConsoleServer.html +++ b/html/classcore_1_1ConsoleServer.html @@ -164,8 +164,8 @@ int bool eventReceived (struct epoll_event event, long long eventId)  Parse epoll event and call specified callbacks. More...
  -int write (std::string data) -  +int write (std::string data, Socket *sender) +  void write (char *buffer, int length)   diff --git a/html/classcore_1_1ConsoleSession-members.html b/html/classcore_1_1ConsoleSession-members.html index 8b920e2..64d2121 100644 --- a/html/classcore_1_1ConsoleSession-members.html +++ b/html/classcore_1_1ConsoleSession-members.html @@ -119,7 +119,7 @@ $(function() { TCPSocket(EPoll &ePoll, std::string text) (defined in core::TCPSocket)core::TCPSocket TerminalSession(EPoll &ePoll, TCPServer &server) (defined in core::TerminalSession)core::TerminalSession terminate()core::TCPSession - write(std::string data)core::Socket + write(std::string data, Socket *sender)core::Socket write(char *buffer, int length) (defined in core::Socket)core::Socket writeLog(std::string data) (defined in core::ConsoleSession)core::ConsoleSession ~ConsoleSession() (defined in core::ConsoleSession)core::ConsoleSession diff --git a/html/classcore_1_1ConsoleSession.html b/html/classcore_1_1ConsoleSession.html index ab7f393..0f559fe 100644 --- a/html/classcore_1_1ConsoleSession.html +++ b/html/classcore_1_1ConsoleSession.html @@ -187,8 +187,8 @@ int bool eventReceived (struct epoll_event event, long long eventId)  Parse epoll event and call specified callbacks. More...
  -int write (std::string data) -  +int write (std::string data, Socket *sender) +  void write (char *buffer, int length)   diff --git a/html/classcore_1_1Socket-members.html b/html/classcore_1_1Socket-members.html index b64d45b..c72af75 100644 --- a/html/classcore_1_1Socket-members.html +++ b/html/classcore_1_1Socket-members.html @@ -91,7 +91,7 @@ $(function() { shutDown (defined in core::Socket)core::Socket shutdown(std::string text="unknown")core::Socket Socket(EPoll &ePoll, std::string text="")core::Socket - write(std::string data)core::Socket + write(std::string data, Socket *sender)core::Socket write(char *buffer, int length) (defined in core::Socket)core::Socket ~Socket()core::Socketvirtual diff --git a/html/classcore_1_1Socket.html b/html/classcore_1_1Socket.html index 628caad..7ff9567 100644 --- a/html/classcore_1_1Socket.html +++ b/html/classcore_1_1Socket.html @@ -127,8 +127,8 @@ int bool eventReceived (struct epoll_event event, long long eventId)  Parse epoll event and call specified callbacks. More...
  -int write (std::string data) -  +int write (std::string data, Socket *sender) +  void write (char *buffer, int length)   @@ -452,8 +452,8 @@ Protected Attributes - -

◆ write()

+ +

◆ write()

@@ -462,8 +462,18 @@ Protected Attributes int core::Socket::write ( std::string  - data) + data, + + + + Socket *  + sender  + + + + ) +
diff --git a/html/classcore_1_1TCPServer-members.html b/html/classcore_1_1TCPServer-members.html index 992b0e2..e1ff42d 100644 --- a/html/classcore_1_1TCPServer-members.html +++ b/html/classcore_1_1TCPServer-members.html @@ -108,7 +108,7 @@ $(function() { TCPSocket(EPoll &ePoll) (defined in core::TCPSocket)core::TCPSocket TCPSocket(EPoll &ePoll, std::string text) (defined in core::TCPSocket)core::TCPSocket whiteListcore::TCPServer - write(std::string data)core::Socket + write(std::string data, Socket *sender)core::Socket write(char *buffer, int length) (defined in core::Socket)core::Socket ~Socket()core::Socketvirtual ~TCPServer()core::TCPServervirtual diff --git a/html/classcore_1_1TCPServer.html b/html/classcore_1_1TCPServer.html index 2ac449f..78098fa 100644 --- a/html/classcore_1_1TCPServer.html +++ b/html/classcore_1_1TCPServer.html @@ -159,8 +159,8 @@ int bool eventReceived (struct epoll_event event, long long eventId)  Parse epoll event and call specified callbacks. More...
  -int write (std::string data) -  +int write (std::string data, Socket *sender) +  void write (char *buffer, int length)   diff --git a/html/classcore_1_1TCPSession-members.html b/html/classcore_1_1TCPSession-members.html index 5c76e3b..7b97c51 100644 --- a/html/classcore_1_1TCPSession-members.html +++ b/html/classcore_1_1TCPSession-members.html @@ -106,7 +106,7 @@ $(function() { TCPSocket(EPoll &ePoll) (defined in core::TCPSocket)core::TCPSocket TCPSocket(EPoll &ePoll, std::string text) (defined in core::TCPSocket)core::TCPSocket terminate()core::TCPSession - write(std::string data)core::Socket + write(std::string data, Socket *sender)core::Socket write(char *buffer, int length) (defined in core::Socket)core::Socket ~Socket()core::Socketvirtual ~TCPSession() (defined in core::TCPSession)core::TCPSessionvirtual diff --git a/html/classcore_1_1TCPSession.html b/html/classcore_1_1TCPSession.html index e463243..a8d30b8 100644 --- a/html/classcore_1_1TCPSession.html +++ b/html/classcore_1_1TCPSession.html @@ -146,8 +146,8 @@ int bool eventReceived (struct epoll_event event, long long eventId)  Parse epoll event and call specified callbacks. More...
  -int write (std::string data) -  +int write (std::string data, Socket *sender) +  void write (char *buffer, int length)   diff --git a/html/classcore_1_1TCPSession2-members.html b/html/classcore_1_1TCPSession2-members.html index aafdbb4..435bdd6 100644 --- a/html/classcore_1_1TCPSession2-members.html +++ b/html/classcore_1_1TCPSession2-members.html @@ -105,7 +105,7 @@ $(function() { TCPSocket(EPoll &ePoll) (defined in core::TCPSocket)core::TCPSocket TCPSocket(EPoll &ePoll, std::string text) (defined in core::TCPSocket)core::TCPSocket terminate()core::TCPSession2 - write(std::string data)core::Socket + write(std::string data, Socket *sender)core::Socket write(char *buffer, int length) (defined in core::Socket)core::Socket ~Socket()core::Socketvirtual ~TCPSession2() (defined in core::TCPSession2)core::TCPSession2virtual diff --git a/html/classcore_1_1TCPSession2.html b/html/classcore_1_1TCPSession2.html index 2bf5875..ea4d00f 100644 --- a/html/classcore_1_1TCPSession2.html +++ b/html/classcore_1_1TCPSession2.html @@ -139,8 +139,8 @@ int bool eventReceived (struct epoll_event event, long long eventId)  Parse epoll event and call specified callbacks. More...
  -int write (std::string data) -  +int write (std::string data, Socket *sender) +  void write (char *buffer, int length)   diff --git a/html/classcore_1_1TCPSocket-members.html b/html/classcore_1_1TCPSocket-members.html index 1fd3007..1670a03 100644 --- a/html/classcore_1_1TCPSocket-members.html +++ b/html/classcore_1_1TCPSocket-members.html @@ -95,7 +95,7 @@ $(function() { Socket(EPoll &ePoll, std::string text="")core::Socket TCPSocket(EPoll &ePoll) (defined in core::TCPSocket)core::TCPSocket TCPSocket(EPoll &ePoll, std::string text) (defined in core::TCPSocket)core::TCPSocket - write(std::string data)core::Socket + write(std::string data, Socket *sender)core::Socket write(char *buffer, int length) (defined in core::Socket)core::Socket ~Socket()core::Socketvirtual ~TCPSocket() (defined in core::TCPSocket)core::TCPSocketvirtual diff --git a/html/classcore_1_1TCPSocket.html b/html/classcore_1_1TCPSocket.html index 97058ad..7e380d1 100644 --- a/html/classcore_1_1TCPSocket.html +++ b/html/classcore_1_1TCPSocket.html @@ -136,8 +136,8 @@ int bool eventReceived (struct epoll_event event, long long eventId)  Parse epoll event and call specified callbacks. More...
  -int write (std::string data) -  +int write (std::string data, Socket *sender) +  void write (char *buffer, int length)   diff --git a/html/classcore_1_1TLSServer-members.html b/html/classcore_1_1TLSServer-members.html index f5ee1c6..77e5338 100644 --- a/html/classcore_1_1TLSServer-members.html +++ b/html/classcore_1_1TLSServer-members.html @@ -111,7 +111,7 @@ $(function() { TCPSocket(EPoll &ePoll, std::string text) (defined in core::TCPSocket)core::TCPSocket TLSServer(EPoll &ePoll, IPAddress address)core::TLSServer whiteListcore::TCPServer - write(std::string data)core::Socket + write(std::string data, Socket *sender)core::Socket write(char *buffer, int length) (defined in core::Socket)core::Socket ~Socket()core::Socketvirtual ~TCPServer()core::TCPServervirtual diff --git a/html/classcore_1_1TLSServer.html b/html/classcore_1_1TLSServer.html index 68f4667..440d10c 100644 --- a/html/classcore_1_1TLSServer.html +++ b/html/classcore_1_1TLSServer.html @@ -166,8 +166,8 @@ int bool eventReceived (struct epoll_event event, long long eventId)  Parse epoll event and call specified callbacks. More...
  -int write (std::string data) -  +int write (std::string data, Socket *sender) +  void write (char *buffer, int length)   diff --git a/html/classcore_1_1TLSSession-members.html b/html/classcore_1_1TLSSession-members.html index 87a1b05..67952b1 100644 --- a/html/classcore_1_1TLSSession-members.html +++ b/html/classcore_1_1TLSSession-members.html @@ -107,7 +107,7 @@ $(function() { TCPSocket(EPoll &ePoll, std::string text) (defined in core::TCPSocket)core::TCPSocket terminate()core::TCPSession TLSSession(EPoll &ePoll, TCPServer &server) (defined in core::TLSSession)core::TLSSession - write(std::string data)core::Socket + write(std::string data, Socket *sender)core::Socket write(char *buffer, int length) (defined in core::Socket)core::Socket ~Socket()core::Socketvirtual ~TCPSession() (defined in core::TCPSession)core::TCPSessionvirtual diff --git a/html/classcore_1_1TLSSession.html b/html/classcore_1_1TLSSession.html index 53d9c85..5718892 100644 --- a/html/classcore_1_1TLSSession.html +++ b/html/classcore_1_1TLSSession.html @@ -150,8 +150,8 @@ int bool eventReceived (struct epoll_event event, long long eventId)  Parse epoll event and call specified callbacks. More...
  -int write (std::string data) -  +int write (std::string data, Socket *sender) +  void write (char *buffer, int length)   diff --git a/html/classcore_1_1TerminalSession-members.html b/html/classcore_1_1TerminalSession-members.html index 5118745..7dcef24 100644 --- a/html/classcore_1_1TerminalSession-members.html +++ b/html/classcore_1_1TerminalSession-members.html @@ -118,7 +118,7 @@ $(function() { TCPSocket(EPoll &ePoll, std::string text) (defined in core::TCPSocket)core::TCPSocket TerminalSession(EPoll &ePoll, TCPServer &server) (defined in core::TerminalSession)core::TerminalSession terminate()core::TCPSession - write(std::string data)core::Socket + write(std::string data, Socket *sender)core::Socket write(char *buffer, int length) (defined in core::Socket)core::Socket ~Socket()core::Socketvirtual ~TCPSession() (defined in core::TCPSession)core::TCPSessionvirtual diff --git a/html/classcore_1_1TerminalSession.html b/html/classcore_1_1TerminalSession.html index 5cc79cb..36c8c19 100644 --- a/html/classcore_1_1TerminalSession.html +++ b/html/classcore_1_1TerminalSession.html @@ -176,8 +176,8 @@ int bool eventReceived (struct epoll_event event, long long eventId)  Parse epoll event and call specified callbacks. More...
  -int write (std::string data) -  +int write (std::string data, Socket *sender) +  void write (char *buffer, int length)   diff --git a/html/classcore_1_1UDPServerSocket-members.html b/html/classcore_1_1UDPServerSocket-members.html index af07dc4..808c785 100644 --- a/html/classcore_1_1UDPServerSocket-members.html +++ b/html/classcore_1_1UDPServerSocket-members.html @@ -97,7 +97,7 @@ $(function() { Socket(EPoll &ePoll, std::string text="")core::Socket UDPServerSocket(EPoll &ePoll, std::string url, short int port, std::string commandName) (defined in core::UDPServerSocket)core::UDPServerSocket UDPSocket(EPoll &ePoll) (defined in core::UDPSocket)core::UDPSocket - write(std::string data)core::Socket + write(std::string data, Socket *sender)core::Socket write(char *buffer, int length) (defined in core::Socket)core::Socket ~Socket()core::Socketvirtual ~UDPServerSocket() (defined in core::UDPServerSocket)core::UDPServerSocket diff --git a/html/classcore_1_1UDPServerSocket.html b/html/classcore_1_1UDPServerSocket.html index 065a439..5c9a3b3 100644 --- a/html/classcore_1_1UDPServerSocket.html +++ b/html/classcore_1_1UDPServerSocket.html @@ -126,8 +126,8 @@ int bool eventReceived (struct epoll_event event, long long eventId)  Parse epoll event and call specified callbacks. More...
  -int write (std::string data) -  +int write (std::string data, Socket *sender) +  void write (char *buffer, int length)   diff --git a/html/classcore_1_1UDPSocket-members.html b/html/classcore_1_1UDPSocket-members.html index 3c77a6d..ad254d7 100644 --- a/html/classcore_1_1UDPSocket-members.html +++ b/html/classcore_1_1UDPSocket-members.html @@ -92,7 +92,7 @@ $(function() { shutDown (defined in core::Socket)core::Socket Socket(EPoll &ePoll, std::string text="")core::Socket UDPSocket(EPoll &ePoll) (defined in core::UDPSocket)core::UDPSocket - write(std::string data)core::Socket + write(std::string data, Socket *sender)core::Socket write(char *buffer, int length) (defined in core::Socket)core::Socket ~Socket()core::Socketvirtual ~UDPSocket() (defined in core::UDPSocket)core::UDPSocket diff --git a/html/classcore_1_1UDPSocket.html b/html/classcore_1_1UDPSocket.html index 2fd01b1..28e0c7b 100644 --- a/html/classcore_1_1UDPSocket.html +++ b/html/classcore_1_1UDPSocket.html @@ -116,8 +116,8 @@ int bool eventReceived (struct epoll_event event, long long eventId)  Parse epoll event and call specified callbacks. More...
  -int write (std::string data) -  +int write (std::string data, Socket *sender) +  void write (char *buffer, int length)   diff --git a/html/functions.html b/html/functions.html index b562a99..d81c41e 100644 --- a/html/functions.html +++ b/html/functions.html @@ -300,7 +300,7 @@ $(function() { : core::TCPServer
  • write() -: core::Socket +: core::Socket
  • diff --git a/html/functions_func.html b/html/functions_func.html index cadc188..cab7b41 100644 --- a/html/functions_func.html +++ b/html/functions_func.html @@ -269,7 +269,7 @@ $(function() {

    - w -

    diff --git a/html/search/all_d.js b/html/search/all_d.js index 3ea4c67..9261f26 100644 --- a/html/search/all_d.js +++ b/html/search/all_d.js @@ -1,5 +1,5 @@ var searchData= [ ['whitelist_71',['whiteList',['../classcore_1_1TCPServer.html#abad6300b6234ca8b69cef9128755342e',1,'core::TCPServer']]], - ['write_72',['write',['../classcore_1_1Socket.html#a1413c826307ef0f29d7457770af675e3',1,'core::Socket']]] + ['write_72',['write',['../classcore_1_1Socket.html#a4ed587f31d080115c00828f90b1e28bb',1,'core::Socket']]] ]; diff --git a/html/search/functions_b.js b/html/search/functions_b.js index a733b17..25ce0a9 100644 --- a/html/search/functions_b.js +++ b/html/search/functions_b.js @@ -1,4 +1,4 @@ var searchData= [ - ['write_146',['write',['../classcore_1_1Socket.html#a1413c826307ef0f29d7457770af675e3',1,'core::Socket']]] + ['write_146',['write',['../classcore_1_1Socket.html#a4ed587f31d080115c00828f90b1e28bb',1,'core::Socket']]] ]; diff --git a/latex/classcore_1_1Socket.tex b/latex/classcore_1_1Socket.tex index 8855979..9717c88 100644 --- a/latex/classcore_1_1Socket.tex +++ b/latex/classcore_1_1Socket.tex @@ -38,7 +38,7 @@ int \mbox{\hyperlink{classcore_1_1Socket_a06ba54744530439d4131e6aba4623d08}{get\ \begin{DoxyCompactList}\small\item\em Get the descriptor for the socket. \end{DoxyCompactList}\item bool \mbox{\hyperlink{classcore_1_1Socket_a1a045e15fb5851d666a21be05ac4c5d7}{event\+Received}} (struct epoll\+\_\+event event, long long event\+Id) \begin{DoxyCompactList}\small\item\em Parse epoll event and call specified callbacks. \end{DoxyCompactList}\item -int \mbox{\hyperlink{classcore_1_1Socket_a1413c826307ef0f29d7457770af675e3}{write}} (std\+::string data) +int \mbox{\hyperlink{classcore_1_1Socket_a4ed587f31d080115c00828f90b1e28bb}{write}} (std\+::string data, \mbox{\hyperlink{classcore_1_1Socket}{Socket}} $\ast$sender) \item \mbox{\Hypertarget{classcore_1_1Socket_a4855594af113428eacdaa7448d661121}\label{classcore_1_1Socket_a4855594af113428eacdaa7448d661121}} void {\bfseries write} (char $\ast$buffer, int length) @@ -215,11 +215,11 @@ set\+Descriptor establishes the file descriptor for the socket and registers the \doxysubsubsection{\texorpdfstring{shutdown()}{shutdown()}} {\footnotesize\ttfamily void core\+::\+Socket\+::shutdown (\begin{DoxyParamCaption}\item[{std\+::string}]{text = {\ttfamily \char`\"{}unknown\char`\"{}} }\end{DoxyParamCaption})} -Use the \mbox{\hyperlink{classcore_1_1Socket_af2d1b6de7a64a9d446b0305b6ec47b31}{shutdown()}} method to terminate the socket connection and remove resources. This method is provided to ensure that all destructors are called for all inherited objects with a virtual destructor. \mbox{\Hypertarget{classcore_1_1Socket_a1413c826307ef0f29d7457770af675e3}\label{classcore_1_1Socket_a1413c826307ef0f29d7457770af675e3}} +Use the \mbox{\hyperlink{classcore_1_1Socket_af2d1b6de7a64a9d446b0305b6ec47b31}{shutdown()}} method to terminate the socket connection and remove resources. This method is provided to ensure that all destructors are called for all inherited objects with a virtual destructor. \mbox{\Hypertarget{classcore_1_1Socket_a4ed587f31d080115c00828f90b1e28bb}\label{classcore_1_1Socket_a4ed587f31d080115c00828f90b1e28bb}} \index{core::Socket@{core::Socket}!write@{write}} \index{write@{write}!core::Socket@{core::Socket}} \doxysubsubsection{\texorpdfstring{write()}{write()}} -{\footnotesize\ttfamily int core\+::\+Socket\+::write (\begin{DoxyParamCaption}\item[{std\+::string}]{data }\end{DoxyParamCaption})} +{\footnotesize\ttfamily int core\+::\+Socket\+::write (\begin{DoxyParamCaption}\item[{std\+::string}]{data, }\item[{\mbox{\hyperlink{classcore_1_1Socket}{Socket}} $\ast$}]{sender }\end{DoxyParamCaption})} Write data to the socket.