swiftlys2/docs/api/releases/features/ai/
API Reference › SteamAPI

ESteamNetConnectionEnd

Enum
Namespace: SwiftlyS2.Shared.SteamAPI · Assembly: SwiftlyS2.CS2.dll
public enum ESteamNetConnectionEnd

Enumerate various causes of connection termination. These are designed to work similar to HTTP error codes: the numeric range gives you a rough classification as to the source of the problem.

View source
k_ESteamNetConnectionEnd_AppException_Generic
2000
k_ESteamNetConnectionEnd_AppException_Max

Use codes in this range for "unusual" disconnection

2999
k_ESteamNetConnectionEnd_AppException_Min

2xxx: Application ended the connection in some sort of exceptional or unusual manner that might indicate a bug or configuration issue.

2000
k_ESteamNetConnectionEnd_App_Generic
1000
k_ESteamNetConnectionEnd_App_Max

Use codes in this range for "normal" disconnection

1999
k_ESteamNetConnectionEnd_App_Min

Application codes. These are the values you will pass to ISteamNetworkingSockets::CloseConnection. You can use these codes if you want to plumb through application-specific reason codes. If you don't need this facility, feel free to always pass k_ESteamNetConnectionEnd_App_Generic. The distinction between "normal" and "exceptional" termination is one you may use if you find useful, but it's not necessary for you to do so. The only place where we distinguish between normal and exceptional is in connection analytics. If a significant proportion of connections terminates in an exceptional manner, this can trigger an alert. 1xxx: Application ended the connection in a "usual" manner. E.g.: user intentionally disconnected from the server, gameplay ended normally, etc

1000
k_ESteamNetConnectionEnd_Invalid

Invalid/sentinel value

0
k_ESteamNetConnectionEnd_Local_HostedServerPrimaryRelay

A hosted server is having trouble talking to the relay that the client was using, so the problem is most likely on our end

3003
k_ESteamNetConnectionEnd_Local_ManyRelayConnectivity

We're having trouble contacting many (perhaps all) relays. Since it's unlikely that they all went offline at once, the best explanation is that we have a problem on our end. Note that we don't bother distinguishing between "many" and "all", because in practice, it takes time to detect a connection problem, and by the time the connection has timed out, we might not have been able to actively probe all of the relay clusters, even if we were able to contact them at one time. So this code just means that: * We don't have any recent successful communication with any relay. * We have evidence of recent failures to communicate with multiple relays.

3002
k_ESteamNetConnectionEnd_Local_Max
3999
k_ESteamNetConnectionEnd_Local_Min

System codes. These will be returned by the system when the connection state is k_ESteamNetworkingConnectionState_ClosedByPeer or k_ESteamNetworkingConnectionState_ProblemDetectedLocally. It is illegal to pass a code in this range to ISteamNetworkingSockets::CloseConnection 3xxx: Connection failed or ended because of problem with the local host or their connection to the Internet.

3000
k_ESteamNetConnectionEnd_Local_NetworkConfig

We're not able to get the SDR network config. This is *almost* always a local issue, since the network config comes from the CDN, which is pretty darn reliable.

3004
k_ESteamNetConnectionEnd_Local_OfflineMode

You cannot do what you want to do because you're running in offline mode.

3001
k_ESteamNetConnectionEnd_Local_P2P_ICE_NoPublicAddresses

ICE P2P rendezvous failed because we were not able to determine our "public" address (e.g. reflexive address via STUN) If relay fallback is available (it always is on Steam), then this is only used internally and will not be returned as a high level failure.

3006
k_ESteamNetConnectionEnd_Local_Rights

Steam rejected our request because we don't have rights to do this.

3005
k_ESteamNetConnectionEnd_Misc_Generic

A failure that isn't necessarily the result of a software bug, but that should happen rarely enough that it isn't worth specifically writing UI or making a localized message for. The debug string should contain further details.

5001
k_ESteamNetConnectionEnd_Misc_InternalError

Generic failure that is most likely a software bug.

5002
k_ESteamNetConnectionEnd_Misc_Max
5999
k_ESteamNetConnectionEnd_Misc_Min

5xxx: Connection failed for some other reason.

5000
k_ESteamNetConnectionEnd_Misc_NoRelaySessionsToClient

A server in a dedicated hosting situation has no relay sessions active with which to talk back to a client. (It's the client's job to open and maintain those sessions.)

5006
k_ESteamNetConnectionEnd_Misc_P2P_NAT_Firewall

NAT punch failed, probably due to NAT/firewall configuration. If relay fallback is available (it always is on Steam), then this is only used internally and will not be returned as a high level failure.

5009
k_ESteamNetConnectionEnd_Misc_P2P_Rendezvous

While trying to initiate a connection, we never received *any* communication from the peer. P2P rendezvous failed in a way that we don't have more specific information

5008
k_ESteamNetConnectionEnd_Misc_PeerSentNoConnection

Our peer replied that it has no record of the connection. This should not happen ordinarily, but can happen in a few exception cases: - This is an old connection, and the peer has already cleaned up and forgotten about it. (Perhaps it timed out and they closed it and were not able to communicate this to us.) - A bug or internal protocol error has caused us to try to talk to the peer about the connection before we received confirmation that the peer has accepted the connection. - The peer thinks that we have closed the connection for some reason (perhaps a bug), and believes that is it is acknowledging our closure.

5010
k_ESteamNetConnectionEnd_Misc_SteamConnectivity

There's some trouble talking to Steam.

5005
k_ESteamNetConnectionEnd_Misc_Timeout

The connection to the remote host timed out, but we don't know if the problem is on our end, in the middle, or on their end.

5003
k_ESteamNetConnectionEnd_Remote_BadCert

You presented me with a cert that was I was able to parse and *technically* we could use encrypted communication. But there was a problem that prevents me from checking your identity or ensuring that somebody int he middle can't observe our communication. E.g.: - the CA key was missing (and I don't accept unsigned certs) - The CA key isn't one that I trust, - The cert doesn't was appropriately restricted by app, user, time, data center, etc. - The cert wasn't issued to you. - etc

4003
k_ESteamNetConnectionEnd_Remote_BadCrypt

Something was invalid with the cert or crypt handshake info you gave me, I don't understand or like your key types, etc.

4002
k_ESteamNetConnectionEnd_Remote_BadProtocolVersion

These will never be returned Something wrong with the protocol version you are using. (Probably the code you are running is too old.)

4006
k_ESteamNetConnectionEnd_Remote_Max
4999
k_ESteamNetConnectionEnd_Remote_Min

4xxx: Connection failed or ended, and it appears that the cause does NOT have to do with the local host or their connection to the Internet. It could be caused by the remote host, or it could be somewhere in between.

4000
k_ESteamNetConnectionEnd_Remote_P2P_ICE_NoPublicAddresses

NAT punch failed failed because we never received any public addresses from the remote host. (But we did receive some signals form them.) If relay fallback is available (it always is on Steam), then this is only used internally and will not be returned as a high level failure.

4007
k_ESteamNetConnectionEnd_Remote_Timeout

The connection was lost, and as far as we can tell our connection to relevant services (relays) has not been disrupted. This doesn't mean that the problem is "their fault", it just means that it doesn't appear that we are having network issues on our end.

4001
k_ESteamNetConnectionEnd__Force32Bit
2147483647