diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-12-15 17:12:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-15 17:12:56 +0100 |
commit | 9b932aa0db2cf26be847159cf5229b4dda8763a5 (patch) | |
tree | 422fbc7540c2d23ede1b5071a194798dca0a9fcf /doc/classes/PacketPeerUDP.xml | |
parent | c5879dbe078efd902638935ced73bd31dea5804e (diff) | |
parent | 4e393ab4a082560f8434b013f4f5bb551c2a0eaf (diff) |
Merge pull request #55958 from timothyqiu/xml-indents
Diffstat (limited to 'doc/classes/PacketPeerUDP.xml')
-rw-r--r-- | doc/classes/PacketPeerUDP.xml | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index 31640eb3d8..cefb74191e 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -107,36 +107,36 @@ <description> Waits for a packet to arrive on the bound address. See [method bind]. [b]Note:[/b] [method wait] can't be interrupted once it has been called. This can be worked around by allowing the other party to send a specific "death pill" packet like this: - [codeblocks] - [gdscript] - socket = PacketPeerUDP.new() - # Server - socket.set_dest_address("127.0.0.1", 789) - socket.put_packet("Time to stop".to_ascii()) + [codeblocks] + [gdscript] + socket = PacketPeerUDP.new() + # Server + socket.set_dest_address("127.0.0.1", 789) + socket.put_packet("Time to stop".to_ascii()) - # Client - while socket.wait() == OK: - var data = socket.get_packet().get_string_from_ascii() - if data == "Time to stop": - return - [/gdscript] - [csharp] - var socket = new PacketPeerUDP(); - // Server - socket.SetDestAddress("127.0.0.1", 789); - socket.PutPacket("Time to stop".ToAscii()); + # Client + while socket.wait() == OK: + var data = socket.get_packet().get_string_from_ascii() + if data == "Time to stop": + return + [/gdscript] + [csharp] + var socket = new PacketPeerUDP(); + // Server + socket.SetDestAddress("127.0.0.1", 789); + socket.PutPacket("Time to stop".ToAscii()); - // Client - while (socket.Wait() == OK) - { - string data = socket.GetPacket().GetStringFromASCII(); - if (data == "Time to stop") - { - return; - } - } - [/csharp] - [/codeblocks] + // Client + while (socket.Wait() == OK) + { + string data = socket.GetPacket().GetStringFromASCII(); + if (data == "Time to stop") + { + return; + } + } + [/csharp] + [/codeblocks] </description> </method> </methods> |