| 16 | | The handshake process is depicted below: |
| 17 | | |
| 18 | | Client Server |
| 19 | | t1 |---------------------------packet size------------------------------->| |
| 20 | | |
| 21 | | t2 |<-------CRC, Seq#, pyld[0], ... , pyld[pkt-size - 3]------------------| |
| 22 | | |
| 23 | | |
| 24 | | The above handshake process [t1,t2] will repeat for 120 seconds after which the connection will be terminated. |
| | 16 | The above handshake process [t1,t2] will repeat for 120 seconds after which the connection will be terminated. |
| 34 | | CRC is calculate from SeqNo to pyld[pkt-size - 3] |
| 35 | | Seq#is an incrementing count for the packet number |
| 36 | | pyld[n] is the random data. |
| 37 | | Note: pkt-size is determined from a socket read function in server. |
| | 26 | CRC is calculate from Seq#to pyld[pkt-size - 3] [[BR]] |
| | 27 | Seq#is an incrementing count for the packet number [[BR]] |
| | 28 | pyld[n] is the random data. [[BR]] |
| | 29 | Note: pkt-size is determined from a socket read function in server. |
| 39 | | This handshake process is depicted below: |
| | 31 | == An example client == |
| | 32 | A python based client code has been attached for reference. |
| | 33 | {{{ |
| | 34 | nilanjan@console.grid:~/CODE/pkt_client$ ./client.py |
| | 35 | Requesting 1024 bytes |
| | 36 | Seq #: 0 with CRC [ 0xbf4d4f4dL ] |
| | 37 | Seq #: 1 with CRC [ 0x6b567e27 ] |
| | 38 | Seq #: 2 with CRC [ 0x41a3778c ] |
| | 39 | Seq #: 3 with CRC [ 0x35735fdd ] |
| | 40 | Seq #: 4 with CRC [ 0x354d9012 ] |
| | 41 | Seq #: 5 with CRC [ 0x3383b06a ] |
| | 42 | Seq #: 6 with CRC [ 0xd4e9ed05L ] |
| | 43 | Seq #: 7 with CRC [ 0x3ee8ee8d ] |
| | 44 | Seq #: 8 with CRC [ 0x22d07f05 ] |
| | 45 | Seq #: 9 with CRC [ 0x945f117fL ] |
| | 46 | Seq #: 10 with CRC [ 0x50ca22f4 ] |
| | 47 | Seq #: 11 with CRC [ 0x1b87b63f ] |
| | 48 | Seq #: 12 with CRC [ 0xe8534403L ] |
| | 49 | Seq #: 13 with CRC [ 0x9ff260caL ] |
| | 50 | }}} |