GTcpServer TCP server端
更多...
#include <gTcpServer.h>
继承自 GObject .
|
template<class Receiver , typename... Args> |
static int | connect (GObject *sender, GSignal< void(Args...)> &signal, Receiver *receiver, void(Receiver::*SlotFunc)(Args...)) |
| 将信号和槽建立连接。
Receiver代表接收者的类型 Args是槽函数/信号的参数列表。 更多...
|
|
template<class Receiver , typename... Args> |
static int | disconnect (GObject *sender, GSignal< void(Args...)> &signal, Receiver *receiver, void(Receiver::*SlotFunc)(Args...)) |
| 将信号和槽断开连接。
Receiver代表接收者的类型 Args是槽函数/信号的参数列表。 更多...
|
|
static bool | isObjectExist (GObject *obj) |
| 判断对象是否已经被析构掉了。 更多...
|
|
GTcpServer::GTcpServer |
( |
GObject * |
parent = 0 , |
|
|
const char * |
name = 0 |
|
) |
| |
|
explicit |
virtual GTcpServer::~GTcpServer |
( |
| ) |
|
|
virtual |
int GTcpServer::bind |
( |
const uint16_t |
hPort, |
|
|
const in_addr_t |
addr |
|
) |
| |
template<class Receiver , typename... Args>
int GObject::connect |
( |
GObject * |
sender, |
|
|
GSignal< void(Args...)> & |
signal, |
|
|
Receiver * |
receiver, |
|
|
void(Receiver::*)(Args...) |
SlotFunc |
|
) |
| |
|
staticinherited |
将信号和槽建立连接。
Receiver代表接收者的类型 Args是槽函数/信号的参数列表。
- 参数
-
sender | 指向发射者的指针 |
signal | 指向信号的引用。 |
receiver | 指向接收者的指针 |
SlotFunc | 指向槽函数的指针 |
- 返回
- 0代表成功;非0代表失败
template<class Receiver , typename... Args>
int GObject::disconnect |
( |
GObject * |
sender, |
|
|
GSignal< void(Args...)> & |
signal, |
|
|
Receiver * |
receiver, |
|
|
void(Receiver::*)(Args...) |
SlotFunc |
|
) |
| |
|
staticinherited |
将信号和槽断开连接。
Receiver代表接收者的类型 Args是槽函数/信号的参数列表。
- 参数
-
sender | 指向发射者的指针 |
signal | 指向信号的引用。 |
receiver | 指向接收者的指针 |
SlotFunc | 指向槽函数的指针 |
- 返回
- 0代表成功;非0代表失败
virtual bool GTcpServer::event |
( |
GEvent * |
| ) |
|
|
virtual |
开发者可以在子类中覆盖此函数,处理自己需要的事件
- 参数
-
- 返回
- bool
重载 GObject .
static bool GObject::isObjectExist |
( |
GObject * |
obj | ) |
|
|
staticinherited |
判断对象是否已经被析构掉了。
- 参数
-
- 返回
- bool true表示对象健在,false表示对象已经被析构掉了
int GTcpServer::listen |
( |
int |
backlog | ) |
|
const char* GObject::name |
( |
| ) |
const |
|
inherited |
GSignal<void(int fd, const sockaddr_in & addr, const socklen_t addr_len)> GTcpServer::onAccept |
GSignal<void(void)> GObject::sigDestroyed |
|
inherited |
该类的文档由以下文件生成: