Add type stubs

Currently only includes typedefs for Ids
Send dummy state to finish handshake
Add initial support for handling requests
Use port 9999 if not supplied