The New Net Library

I’m sorry if this has been asked before, but are you replacing usermessage with the net library as well?

He’s keeping the usermessage library as far as I know.

edit: But removing datastream

I was wondering this, is the net library faster for short messages as well? Or should we continue to use usermessages for that?

I don’t know if the are faster but they have an increased max data limit.

He said somewhere that they’re sent instantly, whereas user messages are sent on frame updates. (afaik)
I also suspect that a lot of small net messages will lag less than a lot of small umsgs, which will be nice.
Incidentally, has the NWVar system been moved from umsgs to this new system?

By the way I couldn’t find this in the thread anywhere, but the net.Receive callback is actually also gives another variable, which is a table:


1	=	Player [1][[RV] TJjokerR]
n	=	1

The sending player and something else?

The n probably means the number of variables send.

No matter how many variables I send it stays at 1.

Number of bytes.

Updated my post sorry, what I meant is that it’s given a table which contains 2 variables. The player and “n”, which always seems to be 1.

Post whatever code relies on usermessages or datastream and i could convert it to use the net library if you want. It’s actually really easy.

It’s a bit redundant seeing as the net library is basically like usermessages 2.0, but if usermessages were removed it would probably break every older script that sends things to clients. So usermessages will be there for legacy support more or less.

So can I use RecipientFilter here or is there some sort of filtering thing I missed

Pfff, RecipientFilter was cooler

Are there any future plans to make it use RecipientFilter? Or is there a way to get members of a RecipientFilter? I’m planning to make usermessages and datastream use the net library and they both can take them in.

From what I saw earlier today it’s still there, but I haven’t tested it yet. I think Drakehawke came to the conclusion that it didn’t though

I’d just override the recipientfilter metatable to store added players so you can get them later.

Ah shit you’re right, I’m not thinking straight, thanks!

Will it support PVS and PAS? Maybe net.SendPVS() and net.SendPAS()?

It already does support PVS.