MetaSoul

Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
emoshapeio::socket Class Reference

`#include <sio_socket.h>`

## Classes
class | impl

## Public Types
typedef std::function< void(const std::string &name, message::ptr const &message, bool need_ack, message::list &ack_message) | event_listener_aux)
typedef std::function< void(event &event) | event_listener)
typedef std::function< void(message::ptr const &message) | error_listener)
typedef std::shared_ptr< socket > | ptr

## Public Member Functions
| ~socket ()
void | on (std::string const &event_name, event_listener const &func)
void | on (std::string const &event_name, event_listener_aux const &func)
void | off (std::string const &event_name)
void | off_all ()
void | close ()
void | on_error (error_listener const &l)
void | off_error ()
void | emit (std::string const &name, message::list const &msglist=nullptr, std::function< void(message::list const &)> const &ack=nullptr)
std::string const & | get_namespace () const
| socket (client_impl_base *, std::string const &)

## Protected Member Functions
void | on_connected ()
void | on_close ()
void | on_open ()
void | on_disconnect ()
void | on_message_packet (packet const &p)

## Friends
class | client_impl_base

## Member Typedef Documentation

## ◆ error_listener

typedef std::function<void(message::ptr const& message) emoshapeio::socket::error_listener)

## ◆ event_listener

typedef std::function<void(event& event) emoshapeio::socket::event_listener)

## ◆ event_listener_aux

typedef std::function<void(const std::string& name,message::ptr const& message,bool need_ack, message::list& ack_message) emoshapeio::socket::event_listener_aux)

## ◆ ptr

typedef std::shared_ptr<socket> emoshapeio::socket::ptr

## Constructor & Destructor Documentation

## ◆ ~socket()

emoshapeio::socket::~socket | ( |  | ) |

## ◆ socket()

emoshapeio::socket::socket | ( | client_impl_base * | client,
|  | std::string const & | nsp )

## Member Function Documentation

## ◆ close()

void emoshapeio::socket::close | ( |  | ) |

## ◆ emit()

void emoshapeio::socket::emit | ( | std::string const & | name,
|  | message::list const & | msglist = nullptr,
|  | std::function< void(message::list const &)> const & | ack = nullptr )

## ◆ get_namespace()

std::string const & emoshapeio::socket::get_namespace | ( |  | ) | const

## ◆ off()

void emoshapeio::socket::off | ( | std::string const & | event_name | ) |

## ◆ off_all()

void emoshapeio::socket::off_all | ( |  | ) |

## ◆ off_error()

void emoshapeio::socket::off_error | ( |  | ) |

## ◆ on() [1/2]

void emoshapeio::socket::on | ( | std::string const & | event_name,
|  | event_listener const & | func )

## ◆ on() [2/2]

void emoshapeio::socket::on | ( | std::string const & | event_name,
|  | event_listener_aux const & | func )

## ◆ on_close()

void emoshapeio::socket::on_close | ( |  | ) |
| protected

## ◆ on_connected()

void emoshapeio::socket::on_connected | ( |  | ) |
| protected

## ◆ on_disconnect()

void emoshapeio::socket::on_disconnect | ( |  | ) |
| protected

## ◆ on_error()

void emoshapeio::socket::on_error | ( | error_listener const & | l | ) |

## ◆ on_message_packet()

void emoshapeio::socket::on_message_packet | ( | packet const & | p | ) |
| protected

## ◆ on_open()

void emoshapeio::socket::on_open | ( |  | ) |
| protected

## Friends And Related Symbol Documentation

## ◆ client_impl_base

friend class client_impl_base
| friend

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

- EmoShapeIOLib/Public/sio_socket.h
- EmoShapeIOLib/Private/sio_socket.cpp