Diary-web-programming
Task description
Build onlien diary program
Use your own computer as server and client to write diary.
Server has the diary file, and respond to client requests.
Client can read, write diary through requests.
Input
Client send request to write or quit.
As aboved, the diary content display once the client connects to the server.
Output
Once the program start, automately display diary content
When user send a line of text, save it automately.
When user ask to quit, exit.
Difficulties
TCP/IP, socket concept
Neglected Details
The server can send bytes, which should be converted to string in client, vice versa.-string to bytes:
.encode()
,bytes to string:.decode()
Use Enter to quit can't work in server, so change it to 'Q'.
Materials:
Code
Last updated