clowwindy/shadowsocks — pull request #214 by wb14123 (2014-11-10 02:39:49+00:00)
Title: fix str/byte issue in python 3

I'm using python 3.4 in my server, and I found TypeError messages related to string and bytes:

```
Nov 10 10:23:33 li570-234.members.linode.com ssserver[3402]: handler.handle_event(sock, event)
Nov 10 10:23:33 li570-234.members.linode.com ssserver[3402]: File "/usr/lib/python3.4/site-packages/shadowsocks/tcprelay.py", line 463, in handle_event
Nov 10 10:23:33 li570-234.members.linode.com ssserver[3402]: self._on_local_write()
Nov 10 10:23:33 li570-234.members.linode.com ssserver[3402]: File "/usr/lib/python3.4/site-packages/shadowsocks/tcprelay.py", line 412, in _on_local_write
Nov 10 10:23:33 li570-234.members.linode.com ssserver[3402]: self._write_to_sock(data, self._local_sock)
Nov 10 10:23:33 li570-234.members.linode.com ssserver[3402]: File "/usr/lib/python3.4/site-packages/shadowsocks/tcprelay.py", line 165, in _write_to_sock
Nov 10 10:23:33 li570-234.members.linode.com ssserver[3402]: s = sock.send(data)
Nov 10 10:23:33 li570-234.members.linode.com ssserver[3402]: TypeError: 'str' does not support the buffer interface
```

This patch fixes that.