canton7
canton7
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
I'm afraid I need to get some sleep: I'll drop back in tomorrow
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
Unless the device is reusing a source port or something for multiple connections? Which would be horribly broken but conceivable
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
Multiple clients can talk the the same http server at the same time, for example
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
But the device should be able to establish a new connection
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
Something else is going on I think, which you either haven't explained, or don't understand.
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
And, why do you care if a connection is in time_wait? That shouldn't matter to anyone
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
But, that means the connection has been closed. Which doesn't match up at all with your description of looking for connections to close?
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
Tcp is the Transport layer, yes
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
Time_wait means the connection had been closed, but the os is waiting for a period before reusing the port, to make sure that the other side doesn't try to keep using that port, no?
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
What "deeper osi level"? The layer below Transport is Network, and that's not relevant here
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
(I hit exactly this problem with my company's own embedded devices fwiw)
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
Also, an existing open connection should not stop the device from opening another connection. I still don't understand that bit
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
Hence my confusion around why you're using GetActiveTcpConnections rather than just using the list that your app knows about
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
(until you try to send some data and that's never acknowledged)
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
That's the root of the problem: according to the spec, it's still open and healthy
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
If the connection is established but one side just disappears, the connection is kept open (for a long time) in case the other side reappears. Windows will also count the connection as active
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
You don't. GetActiveTcpConnections doesn't know either
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
So you've still got your side of the connection open? So you can just close that, or try to send data (which will cause a timeout quire quickly). Also there being an existing dead connection on your side shouldn't stop the device from being able to establish a new connection
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
Don't they have a "get status" command or anything you can use?
41 replies
CC#
Created by ACiDCA7 on 4/1/2025 in #help
getting tcp connection state
Or does the device just disappear?
41 replies