Gah - a solution with more questions. – EntropicLqd
Legacy:InternetLink
From Unreal Wiki, The Unreal Engine Documentation Site
Parent class for Internet connection classes TcpLink and UdpLink.
See InternetLink (UT) for the UT version if this class.
Contents
Enums[edit]
ELinkMode[edit]
Specifies, how received data should be processed.
- MODE_Text
- Data is plain text. The entire buffer should be received as a single string.
- MODE_Line
- Data is plain text. The buffer should be split up into lines and each line should be received as a separate string.
- MODE_Binary
- Data is binary. The data is received in chunks of up to 255 bytes as a byte array.
EReceiveMode[edit]
- RMODE_Manual
- Received events will not be called. Use the IsDataPending() method to check for new data and manually read the data using the appropriate Read*() method.
- RMODE_Event
- Every tick when new data has arrived the Received*() event matching the link mode is called with the new data.
ELineMode[edit]
For line link mode this enum specifies the line separator. Supported separators are CRLF ("\r\n"), only LF ("\n") and LFCR ("\n\r").
- LMODE_auto
- For sending the line separator is CRLF, for receiving the line separator is LF, optionally preceeded by CR.
- LMODE_DOS
- Line separator is CRLF.
- LMODE_UNIX
- Line separator is only LF.
- LMODE_MAC
- Line separator is LFCR.
Structs[edit]
IpAddr[edit]
An IP address with port.
- int Addr
- The IP address as integer.
- int Port
- The port.
Properties[edit]
- ELinkMode LinkMode
- Data receive mode. (Cannot be set in default properties.)
- pointer Socket (const)
- Internal pointer to the native TCP socket.
- int Port (const)
- Bound port, if any.
- pointer RemoteSocket (const)
- Internal pointer to the native TCP remote socket if connected.
- pointer PrivateResolveInfo (private, native, const)
- int DataPending (const)
- Number of bytes pending.
- EReceiveMode ReceiveMode
- Receive mode. (Cannot be set in default properties.)
Methods[edit]
Native Functions[edit]
- bool IsDataPending()
- Returns true if data is pending on the socket.
- bool ParseURL(coerce string URL, out string Addr, out int Port, out string LevelName, out string EntryName)
- Parses an Unreal URL into its component elements. Returns false if the URL was invalid.
- Resolve(coerce string Domain)
- Resolve a domain or dotted IP to an IpAddr struct without Port. This function returns immediately. The Resolved() event will be called on success, otherwise ResolveFailed() is called.
- int GetLastError()
- Returns most recent winsock error.
- string IpAddrToString (IpAddr Arg)
- Convert an IP address to a string.
- bool StringToIpAddr (string Str, out IpAddr Addr)
- Convert a string to an IP
- string GameSpyValidate (string ValidationString)
- Takes a challenge string and returns an encoded validation string.
- string GameSpyGameName()
- GetLocalIP(out IpAddr Arg)
- Fills in the locally bound IP address.
Events[edit]
- Resolved(IpAddr Addr)
- Called when domain resolution is successful. The IpAddr struct Addr contains the valid address.
- ResolveFailed()
- Called when domain resolution fails.