mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Refactored socket send method and message recieved method (#25)
* Enhanced sockets * Removed unnecessary copy operations * Enhanced sock session send method to recieve rref * Enhanced on_read with rvalue reference * Added string_view * Added comments
This commit is contained in:
@@ -15,8 +15,19 @@ class socket_session;
|
||||
class socket_session_handler
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Executes on initiation of a new connection
|
||||
*/
|
||||
virtual void on_connect(socket_session *session) = 0;
|
||||
virtual void on_message(socket_session *session, const std::string &message) = 0;
|
||||
|
||||
/**
|
||||
* Executes on recieval of new message
|
||||
*/
|
||||
virtual void on_message(socket_session *session, std::string &&message) = 0;
|
||||
|
||||
/**
|
||||
* Executes on websocket connection close
|
||||
*/
|
||||
virtual void on_close(socket_session *session) = 0;
|
||||
};
|
||||
} // namespace sock
|
||||
|
||||
Reference in New Issue
Block a user