Skip to content

Commit

Permalink
Reduce latency in local TCP connection
Browse files Browse the repository at this point in the history
  • Loading branch information
wh201906 committed Oct 14, 2023
1 parent 6e1cf6c commit f904345
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This project uses the changelog in accordance with [keepchangelog](http://keepac
- Added `hf iclass creditepurse` command to allow crediting the epurse debit value (@nvx)
- Modified `hf iclass configcard` to only support online mode @ATK
- Modified `hf iclass configcard` command to generate config cards without a cardhelper module by porting the contents of blocks 7 & 7 from nfc-iclass @ATK
- Changed the timeout of local TCP connections (@wh201906)

## [Raccoon.4.17140][2023-09-09]
- Changed text and adjust pm3_test case for mf_aes_brute (@doegox)
Expand Down
11 changes: 10 additions & 1 deletion client/src/comms.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,16 @@ int TestProxmark(pm3_device_t *dev) {
if (g_conn.send_via_fpc_usart) {
PrintAndLogEx(INFO, "PM3 UART serial baudrate: " _YELLOW_("%u") "\n", g_conn.uart_speed);
} else {
int res = uart_reconfigure_timeouts(is_tcp_conn ? UART_TCP_CLIENT_RX_TIMEOUT_MS : UART_USB_CLIENT_RX_TIMEOUT_MS);
int res;
if (is_tcp_conn) {
if (memcmp(g_conn.serial_port_name + 4, "localhost", 9) == 0 || memcmp(g_conn.serial_port_name + 4, "127.0.0.1", 9) == 0) {
res = uart_reconfigure_timeouts(UART_USB_CLIENT_RX_TIMEOUT_MS * 2);
} else {
res = uart_reconfigure_timeouts(UART_TCP_CLIENT_RX_TIMEOUT_MS);
}
} else {
res = uart_reconfigure_timeouts(UART_USB_CLIENT_RX_TIMEOUT_MS);
}
if (res != PM3_SUCCESS) {
return res;
}
Expand Down

0 comments on commit f904345

Please sign in to comment.