// File: enbock[P]Warp10Server/warp10server/src/WebService.cpp
// Function: Warp10::WebService::onListenerCreated(u::Object*)
void  WebService::onListenerCreated(Object* arg)
{
	u::Network::Event* event = ((u::Network::Event*)arg);
	if (event->networkType == type) {
		trace(className() + "::onListenerCreated: Listener ready.");
		IListener* listener = event->listener;
		listener->addEventListener(
			WebEvent::INCOMMING_CONNECTION,
			Callback(this, cb_cast(&WebService::onNewConnection))
		);
		listener->addEventListener(
			WebEvent::WILL_CLOSE,
			Callback(this, cb_cast(&WebService::onListenerClose))
		);
		listener->listen();
	}
	event->destroy();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x58, %rdi
addq $0x38, %rdi
leaq 0x25ee67(%rip), %rsi    # 0x667720
addq $0x38, %rsi
callq 0x409490
testb $0x1, %al
jne 0x4088cb
jmp 0x408baf
movq $0x668c60, %rdi         # imm = 0x668C60
leaq 0x1d27b8(%rip), %rsi    # 0x5db091
callq 0x49dd60
movq %rax, -0x190(%rbp)
movb $0x0, -0x91(%rbp)
movb $0x0, -0xa6(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0x4088fb
jmp 0x408931
movq -0x188(%rbp), %rsi
movq (%rsi), %rax
movq 0x8(%rax), %rax
leaq -0x90(%rbp), %rdi
callq *%rax
movb $0x1, -0x91(%rbp)
leaq -0x58(%rbp), %rsi
leaq 0x1d2a72(%rip), %rdx    # 0x5db396
leaq -0x38(%rbp), %rdi
callq 0x405d00
jmp 0x40892f
jmp 0x408966
leaq -0xa5(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0x435b90
movq -0x198(%rbp), %rdx
movb $0x1, -0xa6(%rbp)
leaq 0x1f8049(%rip), %rsi    # 0x6009a2
leaq -0x38(%rbp), %rdi
callq 0x407e60
jmp 0x408964
jmp 0x408966
movq -0x190(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4b05e0
movq %rax, -0x1a0(%rbp)
jmp 0x40897f
movq -0x1a0(%rbp), %rdi
leaq 0x1d2743(%rip), %rsi    # 0x5db0d0
callq 0x49dd60
movq %rax, -0x1a8(%rbp)
jmp 0x40899b
movq -0x1a8(%rbp), %rdi
movq $0x49d640, %rsi         # imm = 0x49D640
callq 0x49c850
jmp 0x4089b0
leaq -0x38(%rbp), %rdi
callq 0x4adc60
testb $0x1, -0xa6(%rbp)
jne 0x4089c4
jmp 0x4089d0
leaq -0xa5(%rbp), %rdi
callq 0x435bb0
testb $0x1, -0x91(%rbp)
jne 0x4089db
jmp 0x4089e7
leaq -0x90(%rbp), %rdi
callq 0x405650
movq -0x188(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq $0x0, -0x110(%rbp)
movq $0x41, -0x118(%rbp)
movq -0x118(%rbp), %rdx
movq -0x110(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
leaq -0x108(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x410a10
movq -0x1b8(%rbp), %rdi
movq -0x1b0(%rbp), %rdx
movq $0x667788, %rsi         # imm = 0x667788
callq 0x412620
jmp 0x408a63
leaq -0x108(%rbp), %rdi
callq 0x407e40
movq -0x188(%rbp), %rsi
movq -0xb0(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq $0x0, -0x178(%rbp)
movq $0x39, -0x180(%rbp)
movq -0x180(%rbp), %rdx
movq -0x178(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
leaq -0x170(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x410a10
movq -0x1c8(%rbp), %rdi
movq -0x1c0(%rbp), %rdx
movq $0x6677e0, %rsi         # imm = 0x6677E0
callq 0x412620
jmp 0x408adc
leaq -0x170(%rbp), %rdi
callq 0x407e40
movq -0xb0(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
jmp 0x408baf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0x408b56
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0x408b3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4adc60
testb $0x1, -0xa6(%rbp)
jne 0x408b48
jmp 0x408b54
leaq -0xa5(%rbp), %rdi
callq 0x435bb0
jmp 0x408b56
testb $0x1, -0x91(%rbp)
jne 0x408b61
jmp 0x408b6d
leaq -0x90(%rbp), %rdi
callq 0x405650
jmp 0x408bc1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x407e40
jmp 0x408bc1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x407e40
jmp 0x408bc1
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
movq -0xa0(%rbp), %rdi
callq 0x4deb40
nopl (%rax)