Skip to content

BlitzBasic Network

Narta Xaymar Dirks edited this page Nov 1, 2026 · 4 revisions

BlitzBasic: Network

TCP and UDP streams, servers and host lookup.

A TCP or UDP connection is a stream, so everything on BlitzBasic-Streams works on it: WriteInt, ReadLine and so on. IP addresses are whole numbers with the first part in the highest byte, which DottedIP turns into text like 127.0.0.1.

TCP is a connection: one side calls CreateTCPServer and AcceptTCPStream, the other OpenTCPStream, and both can then read and write. Data arrives in order, and reading waits for data until the timeout of TCPTimeouts is over.

UDP is a series of messages: you write into the stream to build a message, send it with SendUDPMsg, and the other side takes the next one with RecvUDPMsg and reads it from its stream. Messages may be lost or arrive out of order. Addresses that are whole numbers can only be IPv4. For IPv6, the commands that give an address as text work with both: see IPv6.

Back to BlitzBasic or the Command Index.

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally