convert is_10/11 into macros instead of functions
Initial websocket API (derived from Marcin Kelar's impl