implementing hac0202 server-side connection as a native app