// File: /workspace/github_cpp_makefile_star2_O3/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 0xd360
leaq 0x250(%rbx), %r15
movq %r15, %rdi
movl %ebp, %esi
callq 0xe328
movq $0x0, 0x10(%rsp)
movl $0x18, %edi
callq 0x4350
leaq 0x30d(%rip), %rcx       # 0x685a
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movq %rbx, 0x10(%rax)
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x1899(%rip), %r12      # 0x7e04
movq %r12, 0x18(%rsi)
leaq 0x18aa(%rip), %r13      # 0x7e20
movq %r13, 0x10(%rsi)
leaq 0x1b0(%rbx), %rdi
callq 0x5290
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x659f
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq $0x0, 0x10(%rsp)
movl $0x18, %edi
callq 0x4350
leaq 0x43d(%rip), %rcx       # 0x69f6
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movq %rbx, 0x10(%rax)
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x18d1(%rip), %rax      # 0x7ea8
movq %rax, 0x18(%rsi)
leaq 0x18e2(%rip), %rax      # 0x7ec4
movq %rax, 0x10(%rsi)
leaq 0x1d0(%rbx), %rdi
callq 0x5354
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x660b
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq $0x0, 0x10(%rsp)
movl $0x18, %edi
callq 0x4350
leaq 0xd0b(%rip), %rcx       # 0x7330
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movq %rbx, 0x10(%rax)
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %r12, 0x18(%rsi)
movq %r13, 0x10(%rsi)
leaq 0x1f0(%rbx), %rdi
callq 0x5290
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x6669
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq $0x0, 0x10(%rsp)
movl $0x18, %edi
callq 0x4350
leaq 0xcaf(%rip), %rcx       # 0x7332
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movq %rbx, 0x10(%rax)
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %r12, 0x18(%rsi)
movq %r13, 0x10(%rsi)
leaq 0x210(%rbx), %rdi
callq 0x5290
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x66c7
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq $0x0, 0x10(%rsp)
movl $0x18, %edi
callq 0x4350
leaq 0xcc3(%rip), %rcx       # 0x73a4
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movq %rbx, 0x10(%rax)
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %r12, 0x18(%rsi)
movq %r13, 0x10(%rsi)
leaq 0x230(%rbx), %rdi
callq 0x5290
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x6725
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %r15, %rdi
callq 0xe4b0
callq 0xf2fe
movq %rax, %rdi
callq 0xf844
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6819
jmp 0x6819
jmp 0x6819
jmp 0x6819
jmp 0x6819
movq %rax, %r12
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x6830
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6830
jmp 0x6819
jmp 0x682d
movq %rax, %r12
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x6830
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6830
jmp 0x6819
jmp 0x682d
movq %rax, %r12
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x6830
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6830
jmp 0x6819
jmp 0x682d
movq %rax, %r12
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x6830
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6830
jmp 0x6819
jmp 0x682d
movq %rax, %r12
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x6830
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6830
movq %rax, %rdi
callq 0x4df2
jmp 0x682d
movq %rax, %r12
jmp 0x6838
movq %rax, %r12
jmp 0x6840
movq %rax, %r12
movq %r15, %rdi
callq 0xe3ac
movq %r14, %rdi
callq 0xd9dc
leaq 0x30(%rbx), %rdi
callq 0x78e4
movq %rbx, %rdi
callq 0x79ce
movq %r12, %rdi
callq 0x45a0
nop