.clang-format
PIEthernet::stopThreadedListen now close device, so repeated listen() works
This commit is contained in:
+1
-1
@@ -199,7 +199,7 @@ SpacesInParentheses: false
|
|||||||
SpacesInSquareBrackets: false
|
SpacesInSquareBrackets: false
|
||||||
SpaceBeforeSquareBrackets: false
|
SpaceBeforeSquareBrackets: false
|
||||||
BitFieldColonSpacing: After
|
BitFieldColonSpacing: After
|
||||||
Standard: c++11
|
Standard: c++17
|
||||||
StatementAttributeLikeMacros:
|
StatementAttributeLikeMacros:
|
||||||
- Q_EMIT
|
- Q_EMIT
|
||||||
- PIMETA
|
- PIMETA
|
||||||
|
|||||||
@@ -206,10 +206,10 @@ void PIEthernet::construct() {
|
|||||||
# endif
|
# endif
|
||||||
# ifdef PIP_EMBEDDED
|
# ifdef PIP_EMBEDDED
|
||||||
setThreadedReadBufferSize(1_KiB);
|
setThreadedReadBufferSize(1_KiB);
|
||||||
# else // PIP_EMBEDDED
|
# else // PIP_EMBEDDED
|
||||||
setThreadedReadBufferSize(64_KiB);
|
setThreadedReadBufferSize(64_KiB);
|
||||||
# endif // PIP_EMBEDDED
|
# endif // PIP_EMBEDDED
|
||||||
// setPriority(piHigh);
|
// setPriority(piHigh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -392,7 +392,7 @@ void PIEthernet::applyBuffers() {
|
|||||||
|
|
||||||
void PIEthernet::applyTimeout(int fd, int opt, PISystemTime tm) {
|
void PIEthernet::applyTimeout(int fd, int opt, PISystemTime tm) {
|
||||||
if (fd == 0) return;
|
if (fd == 0) return;
|
||||||
// piCoutObj << "setReadIsBlocking" << yes;
|
// piCoutObj << "setReadIsBlocking" << yes;
|
||||||
# ifdef WINDOWS
|
# ifdef WINDOWS
|
||||||
DWORD _tm = tm.toMilliseconds();
|
DWORD _tm = tm.toMilliseconds();
|
||||||
# else
|
# else
|
||||||
@@ -597,6 +597,7 @@ void PIEthernet::stopThreadedListen() {
|
|||||||
# endif
|
# endif
|
||||||
PRIVATE->event.destroy();
|
PRIVATE->event.destroy();
|
||||||
closeSockets();
|
closeSockets();
|
||||||
|
opened_ = server_bounded = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user