Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

UE2:InternetLink (UT2004)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 10:55, 27 April 2014 by Wormbo (Talk | contribs) (added most descriptions)

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

InternetLink: Parent class for Internet connection classes

Properties

DataPending

Type: int

Modifiers: const

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

InLineMode

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

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

Type: ELineMode

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

Port

Type: int

Modifiers: const

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

PrivateResolveInfo

Type: pointer

Modifiers: private, native, const

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

ReceiveMode

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

Type: pointer

Modifiers: const

The remote socket for connected TcpLink instances.

Socket

Type: pointer

Modifiers: const

The local socket.

Enums

ELineMode

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

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

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

IpAddr

An IP address and port number.

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

Functions

Native functions

GameSpyGameName

native function string GameSpyGameName ()


GameSpyValidate

native function string GameSpyValidate (string ValidationString)


GetLastError

native function int GetLastError ()


GetLocalIP

native function GetLocalIP (out IpAddr Arg)

Returns the local IP address and port 0.

IpAddrToString

native function string IpAddrToString (IpAddr Arg)

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

IsDataPending

native function bool IsDataPending ()

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

ParseURL

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

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

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

Resolved

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

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.