Skip to content

SendUDPMsgTo

Narta Xaymar Dirks edited this page Nov 1, 2026 · 1 revision

SendUDPMsgTo

SendUDPMsgTo:Void udp_stream:Int32, address:String, dest_port:Int32=0
Parameter Mode Type Default Description
udp_stream In Int32 required The stream to send from.
address In String required The receiver's address or host name, as text. Brackets around an IPv6 address are allowed.
dest_port In Int32 0 The receiver's port. Defaults to 0, which means the port of this stream.

Description

Sends what you wrote to the stream as one message to an address given as text, and empties the stream for the next one. It does what SendUDPMsg does, but the address can be IPv6 and can be a host name.

Differences

  • Not in the original. The message is dropped if the address can not be found, or is an IPv6 address on a system without IPv6. See IPv6.

Examples

a = CreateUDPStream(40762)
b = CreateUDPStream(40763)
UDPTimeouts 1000
WriteInt a, 12345
SendUDPMsgTo a, "127.0.0.1", 40763
Print RecvUDPMsg(b)
Print ReadInt(b)
CloseUDPStream a
CloseUDPStream b
4
12345

Related Commands

CloseUDPStream, CreateUDPStream, GetUDPMsgAddress, GetUDPStreamAddress, RecvUDPMsg, SendUDPMsg, UDPMsgIP, UDPMsgPort

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally