tobby48 4 years ago
parent
commit
2af4736932

+ 1
- 1
src/kr/co/swh/lecture/network/multithread/multithread_client.py View File

@@ -6,7 +6,7 @@ def run():
6 6
     print("클라이언트 소켓정보 : ", s)
7 7
     while True:
8 8
         line = input(':')
9
-        s.sendall(line.encode())    # 서버가 빈 데이터를 받고 연결을 종료할 수 있도록
9
+        s.send(line.encode())    # 서버가 빈 데이터를 받고 연결을 종료할 수 있도록
10 10
         if not line: break         # 빈 데이터를 먼저 보낸 후 루프를 탈출
11 11
         data = s.recv(1024)
12 12
         print("서버로 부터 전달받은 문자열 : ", data.decode())

+ 1
- 1
src/kr/co/swh/lecture/network/multithread/multithread_server.py View File

@@ -10,7 +10,7 @@ def worker(conn, addr):
10 10
         if not data: break
11 11
         print(type(data))
12 12
         print("클라이언트로부터 전송받은 문자열 : ", data.decode())
13
-        conn.sendall(data)      # 메세지를 연결된 클라이언트에게 전달
13
+        conn.send(data)      # 메세지를 연결된 클라이언트에게 전달
14 14
     conn.close()
15 15
     print("{} 종료".format(threading.currentThread().getName()))
16 16