## IpDrv
Class InternetLink

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

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

Direct Known Subclasses:TcpLink, UdpLink

class InternetLink
extends Engine.InternetInfo

    //=============================================================================
    // InternetLink: Parent class for Internet connection classes
    //=============================================================================

Variables
`int` | `DataPending`
`enum` | `ELinkMode`
`enum` | `EReceiveMode`
`int` | `Port`
`int` | `PrivateResolveInfo`

Function Summary
`int` | `GetLastError()`
    // Returns most recent winsock error.
`void` | `GetLocalIP(out IpAddr)`
`string` | `IpAddrToString(IpAddr Arg)`
    // Convert an IP address to a string.
`bool` | `IsDataPending()`
    // Returns true if data is pending on the socket.
`bool` | `ParseURL(string URL, out string, out int, out string, out string)`
    // Parses an Unreal URL into its component elements.
    // Returns false if the URL was invalid.
`void` | `Resolve(string Domain)`
    // Resolve a domain or dotted IP.
    // Nonblocking operation.
    // Triggers Resolved event if successful.
    // Triggers ResolveFailed event if unsuccessful.
`bool` | `StringToIpAddr(string Str, out IpAddr)`
    // Convert a string to an IP
`string` | `Validate(string ValidationString, string GameName)`
    // Validate: Takes a challenge string and returns an encoded validation string.

Source Code

    00001	//=============================================================================
    00002	// InternetLink: Parent class for Internet connection classes
    00003	//=============================================================================
    00004	class InternetLink extends InternetInfo
    00005		native
    00006		transient;
    00007
    00008	//-----------------------------------------------------------------------------
    00009	// Types & Variables.
    00010
    00011	// An IP address.
    00012	struct IpAddr
    00013	{
    00014		var int Addr;
    00015		var int Port;
    00016	};
    00017
    00018	// Data receive mode.
    00019	// Cannot be set in default properties.
    00020	var enum ELinkMode
    00021	{
    00022		MODE_Text,
    00023		MODE_Line,
    00024		MODE_Binary
    00025	} LinkMode;
    00026
    00027	// Internal
    00028	var	const int Socket;
    00029	var const int Port;
    00030	var	const int RemoteSocket;
    00031	var private native const int PrivateResolveInfo;
    00032	var const int DataPending;
    00033
    00034	// Receive mode.
    00035	// If mode is MODE_Manual, received events will not be called.
    00036	// This means it is your responsibility to check the DataPending
    00037	// var and receive the data.
    00038	// Cannot be set in default properties.
    00039	var enum EReceiveMode
    00040	{
    00041		RMODE_Manual,
    00042		RMODE_Event
    00043	} ReceiveMode;
    00044
    00045	//-----------------------------------------------------------------------------
    00046	// Natives.
    00047
    00048	// Returns true if data is pending on the socket.
    00049	native(681) static final function bool IsDataPending();
    00050
    00051	// Parses an Unreal URL into its component elements.
    00052	// Returns false if the URL was invalid.
    00053	native(680) static final function bool ParseURL
    00054	(
    00055		coerce string URL,
    00056		out string Addr,
    00057		out int Port,
    00058		out string LevelName,
    00059		out string EntryName
    00060	);
    00061
    00062	// Resolve a domain or dotted IP.
    00063	// Nonblocking operation.
    00064	// Triggers Resolved event if successful.
    00065	// Triggers ResolveFailed event if unsuccessful.
    00066	native(679) static final function Resolve( coerce string Domain );
    00067
    00068	// Returns most recent winsock error.
    00069	native(678) static final function int GetLastError();
    00070
    00071	// Convert an IP address to a string.
    00072	native(677) static final function string IpAddrToString( IpAddr Arg );
    00073
    00074	// Convert a string to an IP
    00075	native(676) static final function bool StringToIpAddr( string Str, out IpAddr Addr );
    00076
    00077	// Validate: Takes a challenge string and returns an encoded validation string.
    00078	native(675) static final function string Validate( string ValidationString, string GameName );
    00079
    00080	native(674) static final function GetLocalIP(out IpAddr Arg );
    00081
    00082	//-----------------------------------------------------------------------------
    00083	// Events.
    00084
    00085	// Called when domain resolution is successful.
    00086	// The IpAddr struct Addr contains the valid address.
    00087	event Resolved( IpAddr Addr );
    00088
    00089	// Called when domain resolution fails.
    00090	event ResolveFailed();
    00091
    00092	defaultproperties
    00093	{
    00094	}

End Source Code