|
84 | 84 | SNSR_SOCK_ESTABLISHED = const(0x17)
|
85 | 85 | SNSR_SOCK_FIN_WAIT = const(0x18)
|
86 | 86 | _SNSR_SOCK_CLOSING = const(0x1A)
|
87 |
| -_SNSR_SOCK_TIME_WAIT = const(0x1B) |
88 |
| -_SNSR_SOCK_CLOSE_WAIT = const(0x1C) |
| 87 | +SNSR_SOCK_TIME_WAIT = const(0x1B) |
| 88 | +SNSR_SOCK_CLOSE_WAIT = const(0x1C) |
89 | 89 | _SNSR_SOCK_LAST_ACK = const(0x1D)
|
90 | 90 | _SNSR_SOCK_UDP = const(0x22)
|
91 | 91 | _SNSR_SOCK_IPRAW = const(0x32)
|
@@ -826,9 +826,9 @@ def socket_open(self, socket_num: int, conn_mode: int = _SNMR_TCP) -> int:
|
826 | 826 | status = self._read_snsr(socket_num)[0]
|
827 | 827 | if status in (
|
828 | 828 | SNSR_SOCK_CLOSED,
|
829 |
| - _SNSR_SOCK_TIME_WAIT, |
| 829 | + SNSR_SOCK_TIME_WAIT, |
830 | 830 | SNSR_SOCK_FIN_WAIT,
|
831 |
| - _SNSR_SOCK_CLOSE_WAIT, |
| 831 | + SNSR_SOCK_CLOSE_WAIT, |
832 | 832 | _SNSR_SOCK_CLOSING,
|
833 | 833 | _SNSR_SOCK_UDP,
|
834 | 834 | ):
|
@@ -906,7 +906,7 @@ def socket_read( # pylint: disable=too-many-branches
|
906 | 906 | if ret == 0:
|
907 | 907 | # no data on socket?
|
908 | 908 | status = self._read_snmr(socket_num)
|
909 |
| - if status in (SNSR_SOCK_LISTEN, SNSR_SOCK_CLOSED, _SNSR_SOCK_CLOSE_WAIT): |
| 909 | + if status in (SNSR_SOCK_LISTEN, SNSR_SOCK_CLOSED, SNSR_SOCK_CLOSE_WAIT): |
910 | 910 | # remote end closed its side of the connection, EOF state
|
911 | 911 | ret = 0
|
912 | 912 | resp = 0
|
@@ -1004,7 +1004,7 @@ def socket_write(
|
1004 | 1004 | while free_size < ret:
|
1005 | 1005 | free_size = self._get_tx_free_size(socket_num)
|
1006 | 1006 | status = self.socket_status(socket_num)[0]
|
1007 |
| - if status not in (SNSR_SOCK_ESTABLISHED, _SNSR_SOCK_CLOSE_WAIT) or ( |
| 1007 | + if status not in (SNSR_SOCK_ESTABLISHED, SNSR_SOCK_CLOSE_WAIT) or ( |
1008 | 1008 | timeout and time.monotonic() - stamp > timeout
|
1009 | 1009 | ):
|
1010 | 1010 | ret = 0
|
@@ -1049,9 +1049,9 @@ def socket_write(
|
1049 | 1049 | ) != _SNIR_SEND_OK:
|
1050 | 1050 | if self.socket_status(socket_num)[0] in (
|
1051 | 1051 | SNSR_SOCK_CLOSED,
|
1052 |
| - _SNSR_SOCK_TIME_WAIT, |
| 1052 | + SNSR_SOCK_TIME_WAIT, |
1053 | 1053 | SNSR_SOCK_FIN_WAIT,
|
1054 |
| - _SNSR_SOCK_CLOSE_WAIT, |
| 1054 | + SNSR_SOCK_CLOSE_WAIT, |
1055 | 1055 | _SNSR_SOCK_CLOSING,
|
1056 | 1056 | ) or (timeout and time.monotonic() - stamp > timeout):
|
1057 | 1057 | # self.socket_close(socket_num)
|
|
0 commit comments