Am i missing something with the transport layer that i am not aware of?

So i have made a functional communicating project on transport layer for a client scene and server scene.

But i have this feeling there is something that i don’t know that i don’t know.

My transport layer is pretty simple i set it up connecting as per the example code, and start using the receive method and send methods to send data back and forth. Is there nothing i need to be doing for that?

So for example i have been looking at the NetworkConnection.cs file and theres a lot of stuff going on with no real explanation on what half of it is doing?
Mentions of Dispose? And adjusting packet sizes, not fully sure what a packet is? Is that the full byte array i send ?

I am also trying to find their receive method to see what unet might have that i might have missed but i can’t find the script it is in.

I feel like there should be more to it than just simply receive a byte array and using a switch statement to process it. Isn’t there any security things to worry about ?
I am struggling to find any real information on it, i am essentially developing blind and so far it works but no idea if what i have made is on the right path.

The connection classes are for the HLAPI. And what securiy issues do you have in mind?

Well people sending their own byte arrays or even just empty messages or any other potential security issue that i don’t know about. Do you know where their Receive method is to reads the messages that are sent ? Because i could not find it.

That is a part of the library. And what you are talking about, are cheaters. They modify what they send to you. So never trust them with more than you have to.

Yeh but where is it in the source code i can’t find the script in the HLAPI where it is using the method at all.

The LLAPI is not open source. Only the HLAPI is. And the HLAPI is just a framework built ontop of the LLAPI.

What are you talking about the Recieve method is clearly used some where in the HLAPI so i am trying to find the script that is doing so. Since i can use the Recieve it must also be used in the HLAPI otherwise how it is recieving messages from the client?

The NetworkTransport class is Closed Source. All other classes are HLAPI. The HLAPI is built ontop of the LLAPI. So the HLAPI calls the NetworkTransport.Recieve method and then does it’s own fancy stuff with it.

Yes i know, what im asking is where/which script in the source code for HLAPI is it using the NT Receive method? I couldn’t find it.

Connection class.

If you mean NetworkConnection.cs i don’t see it in there. I don’t see another file similar to that name here:

https://bitbucket.org/Unity-Technologies/networking/src/78ca8544bbf4e87c310ce2a9a3fc33cdad2f9bb1/Runtime/?at=5.3

Oh, that was the send. Not sure where the Recieve is done. Haven’t looked at the HLAPI code too much. But I guess in the client object or something alike.

It’s in the NetworkClient where recieve is called