Learning Python Network Programming

(Sean Pound) #1
Chapter 7

Received from client: GET TIME


Sending the server time to client: Sun Mar 15 12:09:16 2015


Server waiting for connection...


When you will run the TCP client script on another terminal then you will get the
following output:


python 7_4_tcp_client_socket_send_data.py


Enter hostname [www.linux.org]: localhost


Enter port [80]: 12345


b'Sun Mar 15 12:09:16 2015'


Want to send more data to server[y/n] :n


Inspecting client/server interaction


Now, once again, you can configure Wireshark to capture packets, as discussed
in the last section. But, in this case, you need to specify the port that your
server is listening on (in the preceding example it's 12345 ), as shown in the
following screenshot:

Free download pdf