lrre-foss / rnr

RNR's Not Roblox
GNU General Public License v3.0
47 stars 3 forks source link

Implement core networking #28

Open sorket opened 1 year ago

sorket commented 1 year ago

Don't start this until after physics, please

floralrainfall commented 1 year ago

Heres what we have in networking so far:

floralrainfall commented 1 year ago

Im just gonna document all the WebService packet types I saw in a decompilation of WebService.dll, with its included pdb.

Network::Replicator::OnReceive

0: Disconnect packet

Doesnt seem like anything is read, prints 'Disconnect from %s'. This falls through into the the case that handles packet type 1 using a goto further in the case statement.

1: Lost connection packet

Doesnt seem like anything is read, prints 'Lost connection to %s'. This signals Network::Replicator::event_Disconnection.

6: ???

This calls Network::Replicator::OnReceive_ID_TIMESTAMP.

57: Properties packet

This seems to receive properties but some weird different kind, as it calls Replicator::readProperties. It looks up if the remote peer is running in the same process as the receiving end.

59: Data packet

This calls Network::Replicator::receiveData. This is where changes to the scene tree and markers are read.

60: MarkerItem packet

This receives a MarkerItem. It reads a float, but I dont know why.

Network::Replicator::receiveData

This is called by data packets. This runs in a loop, reading a type and an impersonate value.

0: End

Stops receiving data.

1: Instance Delete

Calls readInstanceDelete, should be obvious.

2: Instance New

Calls readInstanceNew, should be obvious.

3: Property Change

Calls readChangedProperty, should be obvious.

4: Read Marker

Calls readMarker, should be obvious.

floralrainfall commented 5 months ago

Everything is gone