net.Send delay?

Is there a delay on net.Send. Lets say I tried to send a message in a think function( I know you should not do this and I am not doing it) would it be limited, So say I sent 60 message a second would some of them be ignored by the server or would it receive it fine?

No, they would receive just fine depending on the size of the message. Make your own checks.

They would end up getting received eventually, but since there is a rate limit on networking it might under up overflowing so you’d freeze. But this would also depend on the size of the messages you’re sending.

Yeh, I Just wondered if it was possible to send alot of information without it clogging up and ignoring some. Thanks

[lua]
if CurTime() - last > delay then
net.Start("")
net.Send()
last = CurTime()
end
[/lua]
should be so or simmilar. didnt tested it

If you’re sending that many, there might be a better way to do it.

Like I said I am not. I just wondered if it was possible or if there was some kinda of limitation

I’ve done stress tests with various components in gmod. As said, once you exceed your rate / second maximum in config ( default 20kb/sec ) then the messages will start queuing up. They’ll be received in the order they were sent as time progresses. When the limit of queued messages as been reached ( 2MB if I recall correctly; may be less, I used screenshots as test data ) then the user will time-out.

You shouldn’t need to send anything in a think hook; if you really do need to, then you should throttle it to some interval such as 0.05 or 20 times per second max… I actually recoded someones clock addon from scratch for a friend because it was causing lag on their server because they were sending day of the week, hours, minutes, seconds, etc… in think when it was not necessary to network anything at all …

Rethink how you network data… If there is a way to accomplish something without needing to network anything, and it makes sense, then do it…

Thanks and that is useful but again im not actually going to do this, Was just curious of the limitation of it.