## IpDrv
Class UdpLink

source: C:\XIII\IpDrv\Classes\UdpLink.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Info
             |
             +--Engine.InternetInfo
                |
                +--IpDrv.InternetLink
                   |
                   +--IpDrv.UdpLink

Direct Known Subclasses:UdpBeacon, UdpServerQuery, XIIIServerPing

class UdpLink
extends IpDrv.InternetLink

    //=============================================================================
    // UdpLink: An Internet UDP connectionless socket.
    //=============================================================================

Variables
`int` | `BroadcastAddr`

Function Summary
`int` | `BindPort(optional int, optional bool)`
    // BindPort: Binds a free port or optional port specified in argument one.
`int` | `ReadText(out IpAddr, out string)`
    // ReadText: Reads text string.
    // Returns number of bytes read.
`bool` | `SendText(IpAddr Addr, string Str)`
    // SendText: Sends text string.
    // Appends a cr/lf if LinkMode=MODE_Line .

Source Code

    00001	//=============================================================================
    00002	// UdpLink: An Internet UDP connectionless socket.
    00003	//=============================================================================
    00004	class UdpLink extends InternetLink
    00005		native
    00006		transient;
    00007
    00008	//-----------------------------------------------------------------------------
    00009	// Variables.
    00010
    00011	var() const int BroadcastAddr;
    00012
    00013	//-----------------------------------------------------------------------------
    00014	// Natives.
    00015
    00016	// BindPort: Binds a free port or optional port specified in argument one.
    00017	native(673) static final function int BindPort( optional int Port, optional bool bUseNextAvailable );
    00018
    00019	// SendText: Sends text string.
    00020	// Appends a cr/lf if LinkMode=MODE_Line .
    00021	native(672) static final function bool SendText( IpAddr Addr, coerce string Str );
    00022
    00023	// SendBinary: Send data as a byte array.
    00024	native(671) static final function bool SendBinary( IpAddr Addr, int Count, byte B[255] );
    00025
    00026	// ReadText: Reads text string.
    00027	// Returns number of bytes read.
    00028	native(670) static final function int ReadText( out IpAddr Addr, out string Str );
    00029
    00030	// ReadBinary: Read data as a byte array.
    00031	native(669) static final function int ReadBinary( out IpAddr Addr, int Count, out byte B[255] );
    00032
    00033	//-----------------------------------------------------------------------------
    00034	// Events.
    00035
    00036	// ReceivedText: Called when data is received and connection mode is MODE_Text.
    00037	event ReceivedText( IpAddr Addr, string Text );
    00038
    00039	// ReceivedLine: Called when data is received and connection mode is MODE_Line.
    00040	event ReceivedLine( IpAddr Addr, string Line );
    00041
    00042	// ReceivedBinary: Called when data is received and connection mode is MODE_Binary.
    00043	event ReceivedBinary( IpAddr Addr, int Count, byte B[255] );
    00044
    00045	defaultproperties
    00046	{
    00047	     BroadcastAddr=-1
    00048	     bAlwaysTick=True
    00049	}

End Source Code