use arraybuffer instead of string encoding when creating a socket