The New Net Library

check the comments on my profile, twoski put a dump of the net library there, PAS and PVS are implemented

(thanks twoski)



[h2]Im Currently Working On The Wiki Page If Anyone Wants To Help[/h2]

I know PVS, but what is PAS?

PVS and PAS, what are they both?

PVS is what you can see from that spot, PAS is what you can hear from that spot

Oh my god. You just made me cum a little.

This is amazing.

Would anyone know what would cause the following behavior?

Net lib wont start sending messages (from server) until I execute sv_allowdownload 1 in server console. This was tested in both listen and dedicated, where download was allowed in both upon start-up of the server.

net.Send( ply ) sending net message to all players on server? ply being one player entity.

I’m just wondering if anyone is experiencing anything similar while I continue to comb my gamemode for anything I have done incorrectly.


This actually just seems to affect the first player that connects, subsequent players start receiving net messages, but messages sent to a single player still seem to be broadcasted.

Sending a Table that contains a Table in Net lib causes the sub table to be sent as a number (258)

Also seems to not send empty tables {}, can be annoying when sending tables structures.

Sends as a different number for me, I think it’s taking a character from the key string and converts it to the numerical code.

Didn’t report it as Garry said he was still working on it.

Yes. I figured that out, but when I:

  • SetType on the server (for a table)
  • read the byte on the client to check if it’s a table and then net.ReadTable() it should work fine, instead it breaks at the recursive table where it gets a larger number as an index for the net.ReadVars then it should be.

It’s late, so sorry if that didn’t make sense.

I have two net messages that are sent to the clients by the server.

net.Receive("UpdateRoundInfo", function(size)
	ROUND_TIME = net.ReadFloat()
	ROUND_NUMBER = net.ReadFloat()

net.Receive("StartRound", function(size)
	ROUND_TIME = net.ReadFloat()
	ROUND_NUMBER = net.ReadFloat()

Here’s the code I’m using to call them:

if ROUND_NUMBER == 0 and #player.GetAll() >= MINIMUM_PLAYERS then

The net message SHOULD be sent, because the server prints both A and B when they should be called.
The client prints the round number (So it is receiving) “UpdateRoundInfo”, but “RoundStart” is never called.
I’ve tried printing “HI” and stuff like that, so it’s not a matter of ROUND_NUMBER being nil.

No errors or nothing it’s driving me absolutely insane, plus I can’t even check the Wiki since it decided to go down for a few hours.

My problem is similar Kopimi,

May not be related but try issuing sv_allowdownload 1 on the server console, before sending begin round net message. I found doing this (or reconnecting) tended to make the unsent net messages suddenly start sending/receiving.

Learn to spell receive please. I recreated the page **[Net.Receive](** because you had plenty of typos that would confuse people as to why net.recieve wouldn’t work.

Also I improved your example :v:.

It also doesn’t only take a unique identifier as it’s argument. It takes an identifier and a function, just like usermessage.Hook. It doesn’t return a number either.
Those inconsistencies tend to bug me…

Cleaned up the page a bit more.

on net.Receive serverside, is there a way to know from which client the message originated? That would be good to know