Change to_utf8 to to_utf8_buffer and to_ascii to to_ascii_buffer in remaining docs
The method `to_utf8` doesn't exist in Godot 4, but is still mentioned in the documentation in some places. Replace it with the new name `to_utf8_buffer`. Same for ascii. Same for C#.
This commit is contained in:
parent
79454bfd3b
commit
57dca93718
7 changed files with 38 additions and 38 deletions
|
|
@ -35,7 +35,7 @@
|
|||
if p.get_status() == PacketPeerDTLS.STATUS_CONNECTED:
|
||||
while p.get_available_packet_count() > 0:
|
||||
print("Received message from client: %s" % p.get_packet().get_string_from_utf8())
|
||||
p.put_packet("Hello DTLS client".to_utf8())
|
||||
p.put_packet("Hello DTLS client".to_utf8_buffer())
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
// ServerNode.cs
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
while (p.GetAvailablePacketCount() > 0)
|
||||
{
|
||||
GD.Print($"Received Message From Client: {p.GetPacket().GetStringFromUtf8()}");
|
||||
p.PutPacket("Hello DTLS Client".ToUtf8());
|
||||
p.PutPacket("Hello DTLS Client".ToUtf8Buffer());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
if dtls.get_status() == PacketPeerDTLS.STATUS_CONNECTED:
|
||||
if !connected:
|
||||
# Try to contact server
|
||||
dtls.put_packet("The answer is... 42!".to_utf8())
|
||||
dtls.put_packet("The answer is... 42!".to_utf8_buffer())
|
||||
while dtls.get_available_packet_count() > 0:
|
||||
print("Connected: %s" % dtls.get_packet().get_string_from_utf8())
|
||||
connected = true
|
||||
|
|
@ -133,7 +133,7 @@
|
|||
if (!_connected)
|
||||
{
|
||||
// Try to contact server
|
||||
_dtls.PutPacket("The Answer Is..42!".ToUtf8());
|
||||
_dtls.PutPacket("The Answer Is..42!".ToUtf8Buffer());
|
||||
}
|
||||
while (_dtls.GetAvailablePacketCount() > 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue