feat: Added Read<T> Method to NetworkReader (#1480)

* Added Read<T> Method

* Renamed to ReadMessage
This commit is contained in:
MrGadget 2020-02-06 05:39:39 -05:00 committed by GitHub
parent 02e4245f3d
commit 58df3fd6d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -369,5 +369,10 @@ public static Uri ReadUri(this NetworkReader reader)
{ {
return new Uri(reader.ReadString()); return new Uri(reader.ReadString());
} }
public static void ReadMessage<T>(this NetworkReader reader, T msg) where T : IMessageBase
{
msg.Deserialize(reader);
}
} }
} }