Fix warnings, create endpoint via resolver.
Create acceptor in function: accept_connections