nim_duilib/examples/proto_debuger/tcp_server_form.h
2022-01-06 00:31:24 +08:00

45 lines
968 B
C++

#pragma once
// base header
#include "base/base.h"
#include "serial_port.h"
// duilib
#include "duilib/UIlib.h"
#include "tcp_server_libevent.h"
class TcpServerFrom :
public ui::ChildBox
{
public:
TcpServerFrom(ui::Window* hwnd, string url, uint32_t port, TcpServerLibevent* p);
TcpServerLibevent* ServerP();
virtual void Init() override;
ConnectionLibevent* OnNewConnAccept(struct bufferevent* ev, uint32_t fd, struct sockaddr_in* p1);
void OnDisConnected(ConnectionLibevent*);
protected:
private:
TcpServerLibevent* m_server;
std::string m_url;
uint32_t m_port;
ui::Label* m_label_1;
ui::RichEdit* m_rich_edit_1;
ui::RichEdit* m_rich_edit_2;
ui::RichEdit* m_rich_edit_3;
ui::Button* m_button_1;
ui::CheckBox* m_check_box_1;
ui::CheckBox* m_check_box_2;
ui::RichEdit* m_rich_edit_4;
ui::CheckBox* m_check_box_3;
ui::CheckBox* m_check_box_4;
ui::Button* m_button_2;
ui::Label* m_label_2;
ui::Combo* m_combo_1;
ui::Button* m_button_3;
};