trillek-team / tec

The Trillek Engine
http://trillek.space
GNU Lesser General Public License v3.0
138 stars 21 forks source link

Workaround an asio bug on OSX, async connect and clean up warnings #208

Closed Meisaka closed 3 years ago

Meisaka commented 3 years ago

Description

The asio fix is to set work tracking and use poll() instead of run() Removed some std::move that the compiler flagged for RVO Made the client's Connect asynchronous, it will also show the addresses it resolved. Made client's asio variables static, since there can only be one.

Motivation and Context

On OS X, asio was not calling handlers in the client code, result was a brick. Also got rid of a bunch of warnings, they were bothering me.

How Has This Been Tested?

Run the tests, server, and client on Mac OS X

Types of changes

Checklist: