Mostly Harmless

UE2:InternetLink (UT2004)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT2004 Object >> Actor >> Info >> InternetInfo >> InternetLink
Package: 
IpDrv
Direct subclasses:
TcpLink, UdpLink
This class in other games:
RTNP, U1, UT, U2XMP, U2, UE2Runtime, UT2003, UT3, UDK

InternetLink: Parent class for Internet connection classes

Properties[edit]

DataPending[edit]

Type: int

Modifiers: const

Internal hint whether data is available (1) or not (0).

InLineMode[edit]

Type: ELineMode

When in event receive mode and line link mode, this property tells which line break type to use for received string data.

LinkMode[edit]

Type: ELinkMode

Specifies what kind of data is expected to be received or sent. When sending text data in link mode "line", a line break is appended according to the OutLineMode property.

OutLineMode[edit]

Type: ELineMode

Specifies the type of line break to append when sending text data in link mode "line".

Port[edit]

Type: int

Modifiers: const

Contains the locally bound port after a port has been bound e.g. with TcpLink.BindPort().

PrivateResolveInfo[edit]

Type: pointer

Modifiers: private, native, const

An internal pointer used for resolving DNS names into IP addresses.

ReceiveMode[edit]

Type: EReceiveMode

Specifies whether events should be called when data is received or the code will manually retrieve data using the appropriate read functions.

RemoteSocket[edit]

Type: pointer

Modifiers: const

The remote socket for connected TcpLink instances.

Socket[edit]

Type: pointer

Modifiers: const

The local socket.

Enums[edit]

ELineMode[edit]

Specifies a line break type for link mode "line".

LMODE_auto 
Allows any line break type for received text, appends DOS line break (CRLF) when sending text.
LMODE_DOS 
CRLF
LMODE_UNIX 
LF
LMODE_MAC 
LFCR

ELinkMode[edit]

Specifies whether binary data or text is expected to be sent or received.

MODE_Text 
The received data is expected to be text. When sending text, no line break is appended. When receiving text, it is not split at line breaks.
MODE_Line 
The received data is expected to be text. When sending text, a line break according to the OutLineMode is appended. When receiving text, it is split at the type of line break specified by InLineMode and that line break is discarded.
MODE_Binary 
The received data is expected to be binary data. When sending or reading text, this mode behaves exactly like MODE_Text.

EReceiveMode[edit]

Specifies whether received data is read manually or provided automatically by calling the appropriate event.

RMODE_Manual 
Received data will be read by the read functions defined in subclasses.
RMODE_Event 
Received data will be provided by calling the received events defined in subclasses.

Structs[edit]

IpAddr[edit]

An IP address and port number.

int Addr 
The IP address.
int Port 
The port number.

Functions[edit]

Native functions[edit]

GameSpyGameName[edit]

native function string GameSpyGameName ()


GameSpyValidate[edit]

native function string GameSpyValidate (string ValidationString)


GetLastError[edit]

native function int GetLastError ()


GetLocalIP[edit]

native function GetLocalIP (out IpAddr Arg)

Returns the local IP address and port 0.

IpAddrToString[edit]

native function string IpAddrToString (IpAddr Arg)

Converts the IpAddr value into a readable IP:Port string, e.g. "123.45.67.89:12345".

IsDataPending[edit]

native function bool IsDataPending ()

Returns whether the socket has received data that was not yet read by calling the appropriate read functions.

ParseURL[edit]

native function bool ParseURL (coerce string URL, out string Addr, out int Port, out string LevelName, out string EntryName)

Attempts to parse a URL string like "protocol://host:port/path?options#anchor" (all parts are optional) and returns the host part as address, the port and (if its an internal URL to a local map or game server) the path as map name and the anchor as entry point name. Returns whether the URL string looked valid.

Resolve[edit]

native function Resolve (coerce string Domain)

Resolves the specified DNS name or IP address string. The resolve result is returned by calling Resolved() when resolving was successful. When an IP address string is specified, it is converted and returned immediately via Resolved(). (The Resolved() call happens within the Resolve() call, i.e. be careful when calling Resolve() from Resolved() with IP address strings. Consider using StringToIpAddr() instead.)

StringToIpAddr[edit]

native function bool StringToIpAddr (string Str, out IpAddr Addr)

Converts the specified IP address string to an IpAddr value and returns whether the string represented a valid IP address. Specifying a port is not supported!

Events[edit]

Resolved[edit]

event Resolved (IpAddr Addr)

Called when a Resolve() operation completed successfully. May be called directly from within Resolve() if the string to resolve represented an IP address.

ResolveFailed[edit]

event ResolveFailed ()

Called when a Resolve() operation failed. May be called directly from within Resolve() if the string to resolve represented the IP address 255.255.255.255.