// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/httpserver.cpp
// Function: HttpServer::HttpServer(EventLoop*, int, int, int)
HttpServer::HttpServer(EventLoop *loop, const int port, const int iothreadnum, const int workerthreadnum)
    : tcpserver_(loop, port, iothreadnum),
    threadpool_(workerthreadnum)
{
    tcpserver_.SetNewConnCallback(std::bind(&HttpServer::HandleNewConnection, this, std::placeholders::_1));
    tcpserver_.SetMessageCallback(std::bind(&HttpServer::HandleMessage, this, std::placeholders::_1, std::placeholders::_2));
    tcpserver_.SetSendCompleteCallback(std::bind(&HttpServer::HandleSendComplete, this, std::placeholders::_1));
    tcpserver_.SetCloseCallback(std::bind(&HttpServer::HandleClose, this, std::placeholders::_1));
    tcpserver_.SetErrorCallback(std::bind(&HttpServer::HandleError, this, std::placeholders::_1));

    threadpool_.Start(); //工作线程池启动
    TimerManager::GetTimerManagerInstance()->Start(); //HttpServer定时器管理器启动
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %r8d, %ebp
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
andl $0x0, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
andl $0x0, 0x38(%rdi)
andq $0x0, 0x40(%rdi)
leaq 0x38(%rdi), %rax
movq %rax, 0x48(%rdi)
movq %rax, 0x50(%rdi)
leaq 0x88(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movups %xmm0, 0x78(%rdi)
movq %r14, %rdi
callq 0xbb50
leaq 0x250(%rbx), %r15
movq %r15, %rdi
movl %ebp, %esi
callq 0xcaf4
leaq 0x1a3(%rip), %rax       # 0x614a
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
leaq 0x8(%rsp), %rdi
callq 0x6976
leaq 0x1b0(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x4dee
leaq 0x8(%rsp), %rdi
callq 0x4a60
leaq 0x286(%rip), %rax       # 0x626a
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
leaq 0x8(%rsp), %rdi
callq 0x69be
leaq 0x1d0(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x4e82
leaq 0x8(%rsp), %rdi
callq 0x4a60
leaq 0x741(%rip), %rax       # 0x6762
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
leaq 0x8(%rsp), %rdi
callq 0x6976
leaq 0x1f0(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x4dee
leaq 0x8(%rsp), %rdi
callq 0x4a60
leaq 0x706(%rip), %rax       # 0x6764
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
leaq 0x8(%rsp), %rdi
callq 0x6976
leaq 0x210(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x4dee
leaq 0x8(%rsp), %rdi
callq 0x4a60
leaq 0x71b(%rip), %rax       # 0x67b6
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
leaq 0x8(%rsp), %rdi
callq 0x6976
leaq 0x230(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x4dee
leaq 0x8(%rsp), %rdi
callq 0x4a60
movq %r15, %rdi
callq 0xcc24
callq 0xd8fc
movq %rax, %rdi
callq 0xdcae
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6103
jmp 0x611e
jmp 0x6103
jmp 0x611e
jmp 0x6103
jmp 0x611e
jmp 0x6103
jmp 0x611e
movq %rax, %r12
leaq 0x8(%rsp), %rdi
callq 0x4a60
jmp 0x6121
jmp 0x611e
movq %rax, %r12
jmp 0x6129
movq %rax, %r12
jmp 0x6131
movq %rax, %r12
movq %r15, %rdi
callq 0xcb56
movq %r14, %rdi
callq 0xbfd0
leaq 0x30(%rbx), %rdi
callq 0x6c00
movq %rbx, %rdi
callq 0x6cf6
movq %r12, %rdi
callq 0x4570