Skip to content

Commit

Permalink
Convert string into binary on CSA TCP protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
gunyarakun committed Oct 15, 2016
1 parent 2993d7f commit b9b719f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shogi/CSA.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,10 @@ def command(self, command):
return line

def write(self, buf):
self.socket.sendall(buf)
self.socket.sendall(buf.encode('utf-8'))

def read(self):
buf = self.socket.recv(SOCKET_RECV_SIZE)
buf = self.socket.recv(SOCKET_RECV_SIZE).decode('utf-8')
self.recv_buf += buf
return len(buf)

Expand Down

0 comments on commit b9b719f

Please sign in to comment.