// File: enbock[P]Warp10Server/warp10server/src/Network/WebListener.cpp
// Function: Warp10::Network::WebListener::listen()
void WebListener::listen()
{
	bool ret = _socket->listen();

	if(ret == false) {
		error(className()+"::listen: Can not etablish connection.");
		u::Network::Event close(
			u::Network::Event::CLOSE
		);
		dispatchEvent(&close);
		return;
	}

	// start incoming connections
	Callback cb(this, cb_cast(&WebListener::listenSocket));
	ThreadSystem::create(&cb);

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq 0x90(%rax), %rdi
callq 0x41b2a0
andb $0x1, %al
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x40c5c3
movq $0x668b40, %rdi         # imm = 0x668B40
leaq 0x1cee46(%rip), %rsi    # 0x5db220
callq 0x49dd60
movq %rax, -0x1d0(%rbp)
movb $0x0, -0x89(%rbp)
movb $0x0, -0x9e(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0x40c3fc
jmp 0x40c432
movq -0x1c8(%rbp), %rsi
movq (%rsi), %rax
movq 0x8(%rax), %rax
leaq -0x88(%rbp), %rdi
callq *%rax
movb $0x1, -0x89(%rbp)
leaq -0x50(%rbp), %rsi
leaq 0x1cf4c9(%rip), %rdx    # 0x5db8ee
leaq -0x30(%rbp), %rdi
callq 0x405d00
jmp 0x40c430
jmp 0x40c467
leaq -0x9d(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x435b90
movq -0x1d8(%rbp), %rdx
movb $0x1, -0x9e(%rbp)
leaq 0x1f4548(%rip), %rsi    # 0x6009a2
leaq -0x30(%rbp), %rdi
callq 0x407e60
jmp 0x40c465
jmp 0x40c467
movq -0x1d0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x4b05e0
movq %rax, -0x1e0(%rbp)
jmp 0x40c480
movq -0x1e0(%rbp), %rdi
leaq 0x1cec42(%rip), %rsi    # 0x5db0d0
callq 0x49dd60
movq %rax, -0x1e8(%rbp)
jmp 0x40c49c
movq -0x1e8(%rbp), %rdi
movq $0x49d640, %rsi         # imm = 0x49D640
callq 0x49c850
jmp 0x40c4b1
leaq -0x30(%rbp), %rdi
callq 0x4adc60
testb $0x1, -0x9e(%rbp)
jne 0x40c4c5
jmp 0x40c4d1
leaq -0x9d(%rbp), %rdi
callq 0x435bb0
testb $0x1, -0x89(%rbp)
jne 0x40c4dc
jmp 0x40c4e8
leaq -0x88(%rbp), %rdi
callq 0x405650
movq $0x667c28, %rsi         # imm = 0x667C28
leaq -0x158(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
callq 0x41fd30
movq -0x1c8(%rbp), %rdi
movq -0x1f0(%rbp), %rsi
callq 0x412820
jmp 0x40c517
leaq -0x158(%rbp), %rdi
callq 0x41fee0
jmp 0x40c642
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x40c584
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x40c56b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x4adc60
testb $0x1, -0x9e(%rbp)
jne 0x40c576
jmp 0x40c582
leaq -0x9d(%rbp), %rdi
callq 0x435bb0
jmp 0x40c584
testb $0x1, -0x89(%rbp)
jne 0x40c58f
jmp 0x40c59b
leaq -0x88(%rbp), %rdi
callq 0x405650
jmp 0x40c64b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x41fee0
jmp 0x40c64b
movq -0x1c8(%rbp), %rsi
movq $0x0, -0x1b8(%rbp)
movq $0x41, -0x1c0(%rbp)
movq -0x1c0(%rbp), %rdx
movq -0x1b8(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
leaq -0x1b0(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x410a10
movq -0x1f8(%rbp), %rdi
callq 0x41d040
jmp 0x40c614
leaq -0x1b0(%rbp), %rdi
callq 0x407e40
jmp 0x40c642
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x407e40
jmp 0x40c64b
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
movq -0x98(%rbp), %rdi
callq 0x4deb40
nopw (%rax,%rax)