// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
xorl %edi, %edi
movl %edi, 0x8(%rbx)
movq %rdi, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq %rdi, 0x28(%rbx)
leaq 0x38(%rbx), %rax
movl %edi, 0x38(%rbx)
movq %rdi, 0x40(%rbx)
movq %rax, 0x48(%rbx)
movq %rax, 0x50(%rbx)
leaq 0x88(%rbx), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movups %xmm0, 0x78(%rbx)
movq %r14, %rdi
callq 0xd3b8
leaq 0x250(%rbx), %r15
movq %r15, %rdi
movl %ebp, %esi
callq 0xe398
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl $0x18, %edi
callq 0x4350
leaq 0x2fa(%rip), %rcx       # 0x686e
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x1890(%rip), %r12      # 0x7e20
movq %r12, 0x18(%rsi)
leaq 0x18a1(%rip), %r13      # 0x7e3c
movq %r13, 0x10(%rsi)
leaq 0x1b0(%rbx), %rdi
callq 0x52a0
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x65c2
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl $0x18, %edi
callq 0x4350
leaq 0x42b(%rip), %rcx       # 0x6a0a
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x18cd(%rip), %rax      # 0x7ec8
movq %rax, 0x18(%rsi)
leaq 0x18de(%rip), %rax      # 0x7ee4
movq %rax, 0x10(%rsi)
leaq 0x1d0(%rbx), %rdi
callq 0x5364
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x662d
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl $0x18, %edi
callq 0x4350
leaq 0xd04(%rip), %rcx       # 0x734e
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %rsp, %rsi
movq %rax, (%rsi)
movq %r12, 0x18(%rsi)
movq %r13, 0x10(%rsi)
leaq 0x1f0(%rbx), %rdi
callq 0x52a0
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x668a
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl $0x18, %edi
callq 0x4350
leaq 0xca9(%rip), %rcx       # 0x7350
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %rsp, %rsi
movq %rax, (%rsi)
movq %r12, 0x18(%rsi)
movq %r13, 0x10(%rsi)
leaq 0x210(%rbx), %rdi
callq 0x52a0
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x66e7
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl $0x18, %edi
callq 0x4350
leaq 0xcbe(%rip), %rcx       # 0x73c2
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %rsp, %rsi
movq %rax, (%rsi)
movq %r12, 0x18(%rsi)
movq %r13, 0x10(%rsi)
leaq 0x230(%rbx), %rdi
callq 0x52a0
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x6744
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %r15, %rdi
callq 0xe522
callq 0xf37e
movq %rax, %rdi
callq 0xf8d0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x682e
jmp 0x682e
jmp 0x682e
jmp 0x682e
jmp 0x682e
movq %rax, %r12
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x6845
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6845
jmp 0x682e
jmp 0x6842
movq %rax, %r12
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x6845
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6845
jmp 0x682e
jmp 0x6842
movq %rax, %r12
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x6845
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6845
jmp 0x682e
jmp 0x6842
movq %rax, %r12
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x6845
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6845
jmp 0x682e
jmp 0x6842
movq %rax, %r12
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x6845
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6845
movq %rax, %rdi
callq 0x4df2
jmp 0x6842
movq %rax, %r12
jmp 0x684d
movq %rax, %r12
jmp 0x6855
movq %rax, %r12
movq %r15, %rdi
callq 0xe41c
movq %r14, %rdi
callq 0xda44
leaq 0x30(%rbx), %rdi
callq 0x790a
movq %rbx, %rdi
callq 0x79f4
movq %r12, %rdi
callq 0x45a0