Resurrected hack to workaround withCString crash
Made asyncWrite() a generic function, takes any array now (eg CChar or UInt8)