Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by NaXDy · Nov 15, 2015 at 10:17 AM · networkingmultiplayerclient-serverunity multiplayerchannel

[UNET] Connection between Client and Server dies without message

I have a project where the client requests data in chunks of 8204 bytes per message from the server. The code is laid out so that the client can NOT request another chunk before the pending request has been fulfilled (to prevent a sudden income of lots of data).

However, at some point the connection between client and server seems to abrupt without any warning or error message. The player prefab disappears on the server, and the client can't send any more requests.

Also, upon adding "sent request", "received response" to client, and "received request", and "sent response" to server, I have found out the following:

The connection always breaks when there is a pending request for data by the client, e.g.:

Client: Sent request Received response Sent request

Server: Received request Sent response

The server has NEVER finished saying "received request", so something on the way from the client to the server must be faulty. Also, sometimes the connection breaks after 1 request, sometimes after 500 and sometimes it doesn't break at all (although the more requests you send, the more likely it is to break, so not breaking is highly unlikely).

I have found that removing the NetworkTransform script from my player prefab increased the likelihood of it working. That said, the likelihood is still very, very low.

With logging enabled, the server gives me these last messages (this is from a scenario where the connection broke after 1 request):

ConnectionRecv con:1 bytes:13 msgId:5 FB83E04C57030030FBF0FFFFFF UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

ConnectionSend con:1 bytes:8204 msgId:3214 0000000030000000F0FFFFFF04000400040004000400040004000400040004000400040004000400040004000400040004000400040004000400040004000400040004000400040004000400040004000400040004000400040004000400040004000400040004000400040004000400040004000400040004000400040004000400040004000400040004000400040004000400 UnityEngine.Networking.NetworkConnection:SendWriter(NetworkWriter, Int32) NetworkPlayerEnabler:SendChunk(NetworkConnection, Int32, Int32, Int32, UInt16[]) (at Assets/_Scripts/Networking/Player/NetworkPlayerEnabler.cs:255) NetworkPlayerEnabler:CmdPopulateChunk(Int32, Int32, Int32) (at Assets/_Scripts/Networking/Player/NetworkPlayerEnabler.cs:231) NetworkPlayerEnabler:InvokeCmdCmdPopulateChunk(NetworkBehaviour, NetworkReader) UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

ConnectionSend con:1 bytes:1 msgId:1 03 UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

msgId 5 is the request to send out a chunk, msgId 3214 is the response (containing the chunk), but msgId 1 is something I don't know, and it only appears once the connection broke. The client only shows the request, receive, request and nothing special.

The channel type I'm using is reliable fragmented, but I've also tried with reliable sequenced, unreliable fragmented and unreliable sequenced. Results were the same.

If the application runs as host, everything works fine, without a single problem.

Any help to get this fixed somehow is appreciated.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Unity networking tutorial? 6 Answers

Unity Multiplayer (Mirror) - Problem in syncing game object's variables across all clients. [Trying to send command for object without authority] 0 Answers

Master Server Explanation? 0 Answers

How to test Unity's new networking layer in separate game instances? 0 Answers

UNet | I'm having trouble assigning authority to game objects 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges