P2PSP / simulator

A complete stand-alone simulator for the P2PSP protocol
GNU General Public License v3.0
18 stars 15 forks source link

Concise representation of a peer end-point #32

Closed sachinsngh165 closed 6 years ago

sachinsngh165 commented 6 years ago

refer to this issue

vicente-gonzalez-ruiz commented 6 years ago

Hi @sachinsngh165, thank you for the PR.

It works pretty well. However, this is not the solution I had in mind (sorry).

  1. The hash function only needs to be used for printing the buffer (I prefer to keep viewing the endpoints of the peers, except when the buffer is displayed).
  2. The length of the buffer line (the line of dots and peers which has sent a chunk) must have always the same length. Because we are using a single character for printing an empty space in the buffer, the filled spaces in the buffer should be also printed with one character. Please, use a printable (maybe, adding 32 to the hash code) ASCII code of the sending peer instead of the pattern Pxx. I know that it can be very tricky the tracking of the sending peers, but I prefer it.

Thank you!

sachinsngh165 commented 6 years ago

sure! i'll make those improvements in a next PR :)

vicente-gonzalez-ruiz commented 6 years ago

Fine! Thank you!