Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

NetworkConnectionError

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Possible status messages returned by Network.Connect and in OnFailedToConnect in case the error was not immediate.

Variables

NoError No error occurred.
RSAPublicKeyMismatch We presented an RSA public key which does not match what the system we connected to is using.
InvalidPassword The server is using a password and has refused our connection because we did not set the correct password.
ConnectionFailed Connection attempt failed, possibly because of internal connectivity problems.
TooManyConnectedPlayers The server is at full capacity, failed to connect.
ConnectionBanned We are banned from the system we attempted to connect to (likely temporarily).
AlreadyConnectedToServer We are already connected to this particular server (can happen after fast disconnect/reconnect).
AlreadyConnectedToAnotherServer Cannot connect to two servers at once. Close the connection before connecting again.
CreateSocketOrThreadFailure Internal error while attempting to initialize network interface. Socket possibly already in use.
IncorrectParameters Incorrect parameters given to Connect function.
EmptyConnectTarget No host target given in Connect.
InternalDirectConnectFailed Client could not connect internally to same network NAT enabled server.
NATTargetNotConnected The NAT target we are trying to connect to is not connected to the facilitator server.
NATTargetConnectionLost Connection lost while attempting to connect to NAT target.
NATPunchthroughFailed NAT punchthrough attempt has failed. The cause could be a too restrictive NAT implementation on either endpoints.