Skip to content

b07505054/computer-network-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

computer network (python)

send-encrypted-message

client:encrypting and encoding before tranlating data
server:decoding and verifying the data image

AES456加密

from simplecrypt import encrypt, decrypt 
passkey = 'wowstr1 = 'I am okaycipher = encrypt(passkey, str1) 
print(cipher)

What I achive : all spec above

Go-Back-N RDT

sender: sending data with go-back-n
receiver: if receiving data correctly , sending ack in return , while pack 2,9 being setted loss. image

send_base = 0 --> send_base指標位置
next_seq_num = 0 --> next_seq_num位置
cwnd_size = 3 --> window的大小為3
num_pkt = 10 --> 總共要送出10個封包

timer sample code

client.settimeout(5)

  try:
    serverMessage, addr = client.recvfrom(1024)
  except Exception as e:
    print('timeout')
    # the codes to handle the timeout event

What I achive : all spec above

Dijkstra Algorithm

image image

About

fundamental internet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages