- Extends
- Info
- Modifiers
- config dependson ( HttpUtil )
HttpSock
Base of [[LibHTTP]] this implements the main network methods for connecting
to a webserver and retreiving data from it. Binary data is not supported.
Dcoumentation and Information:
http://wiki.beyondunreal.com/wiki/LibHTTP
Authors: Michiel 'El Muerte' Hendriks <elmuerte@drunksnipers.com>
Copyright 2003-2005 Michiel "El Muerte" Hendriks
Released under the Lesser Open Unreal Mod License
http://wiki.beyondunreal.com/wiki/LesserOpenUnrealModLicense
Core.Object
|
+-- Engine.Actor
|
+-- Engine.Info
|
+-- LibHTTP4.HttpSock
Direct Known Subclasses:
UTANUplink
Inherited Variables from Engine.Actor |
Acceleration, AccumKarmaAngleError, ActorRenderData, AmbientGlow, AmbientSound, AntiPortal, Attached, AttachmentBone, AttachTag, bAcceptsProjectors, bActorShadows, bAlreadyPrecachedMaterials, bAlreadyPrecachedMeshes, bAlwaysFaceCamera, bAlwaysRelevant, bAlwaysTick, bAlwaysZeroBoneOffset, bAnimByOwner, Base, bAttenByLife, bAutoAlignToTerrain, bBadStateCode, bBlockActors, bBlockKarma, bBlockNonZeroExtentTraces, bBlockPlayers, bBlockProjectiles, bBlocksTeleport, bBlockZeroExtentTraces, bBounce, bCanBeDamaged, bCanTeleport, bClientAnim, bClientAuthoritative, bClientDemoNetFunc, bClientDemoRecording, bClientTrigger, bCollideActors, bCollideWhenPlacing, bCollideWorld, bCompressedPosition, bCorona, bDeferRendering, bDeleteMe, bDemoOwner, bDemoRecording, bDestroyInPainVolume, bDetailAttachment, bDirectional, bDirectionalCorona, bDisableSorting, bDisturbFluidSurface, bDramaticLighting, bDynamicLight, bEdShouldSnap, bEdSnap, bFixedRotationDir, bForceSkelUpdate, bFullVolume, bGameRelevant, bHardAttach, bHidden, bHiddenEd, bHiddenEdGroup, bHighDetail, bHurtEntry, bIgnoreEncroachers, bIgnoreOutOfWorld, bIgnoreTerminalVelocity, bIgnoreVehicles, bInterpolating, bJustTeleported, bLightChanged, bLightingVisibility, bLockLocation, bMovable, bNetDirty, bNetInitial, bNetInitialRotation, bNetNotify, bNetOwner, bNetRelevant, bNetTemporary, bNoDelete, bNoRepMesh, bNotifyLocalPlayerTeamReceived, bNotOnDedServer, bObsolete, bOnlyAffectPawns, bOnlyDirtyReplication, bOnlyDrawIfAttached, bOnlyOwnerSee, bOnlyRelevantToOwner, bOrientOnSlope, bOrientToVelocity, bOwnerNoSee, bPathColliding, bPathTemp, bPendingDelete, bProjTarget, bRepClientDemo, bReplicateAnimations, bReplicateInstigator, bReplicateMovement, bRotateToDesired, Brush, bScriptInitialized, bSelected, bShadowCast, bShouldBaseAtStartup, bShouldStopKarma, bShowOctreeNodes, bSkipActorPropertyReplication, bSmoothKarmaStateUpdates, bSpecialLit, bStasis, bStatic, bStaticLighting, bSuperHighDetail, bTearOff, bTempEditor, bTicked, bTimerLoop, bTraceWater, bTrailerAllowRotation, bTrailerPrePivot, bTrailerSameRotation, bTravel, bUnlit, Buoyancy, bUpdateSimulatedPosition, bUseCollisionStaticMesh, bUseCylinderCollision, bUseDynamicLights, bUseLightingFromBase, bWasSNFiltered, bWorldGeometry, CachedLocalToWorld, CachedLocation, CachedRotation, ClientOverlayCounter, ClientOverlayTimer, CollisionHeight, CollisionRadius, CollisionTag, ColLocation, CullDistance, Deleted, DesiredRotation, DrawScale, DrawScale3D, DrawType, Event, ExcludeTag[8], FluidSurfaceShootStrengthMod, ForcedVisibilityZoneTag, ForceNoise, ForceRadius, ForceScale, ForceType, Group, HardRelMatrix, HighDetailOverlay, InitialState, Instigator, Inventory, JoinedTag, KParams, KStepTag, LastRenderTime, LatentFloat, Leaves, Level, LifeSpan, LightBrightness, LightCone, LightEffect, LightHue, LightPeriod, LightPhase, LightRadius, LightRenderData, LightSaturation, LightType, Location, LODBias, Mass, MaxLights, Mesh, MeshInstance, MessageClass, NetPriority, NetTag, NetUpdateFrequency, NetUpdateTime, OctreeBox, OctreeBoxCenter, OctreeBoxRadii, OctreeNodes, OverlayMaterial, OverlayTimer, Owner, PendingTouch, Physics, PhysicsVolume, PrePivot, Projectors, Region, RelativeLocation, RelativeRotation, RemoteRole, RenderRevision, RepSkin, Role, Rotation, RotationRate, ScaleGlow, SimAnim, Skins, SoundOcclusion, SoundPitch, SoundRadius, SoundVolume, StaticFilterState, StaticMesh, StaticMeshInstance, StaticMeshProjectors, StaticSectionBatches, Style, SurfaceType, Tag, Texture, TimerCounter, TimerRate, Touching, TransientSoundRadius, TransientSoundVolume, UV2Mode, UV2Texture, Velocity, XLevel |
Enumerations Summary |
EAuthMethod AM_None,
AM_Unknown,
AM_Basic,
AM_Digest,
|
ETransferMode TM_Normal,
TM_Fast,
|
HTTPState HTTPState_Resolving,
HTTPState_Connecting,
HTTPState_SendingRequest,
HTTPState_WaitingForResponse,
HTTPState_ReceivingData,
HTTPState_Closed,
|
Inherited Enumerations from Engine.Actor |
EDoubleClickDir, EDrawType, EFilterState, EFlagState, EForceType, eKillZType, ELightEffect, ELightType, EMusicTransition, ENetRole, EPhysics, ERenderStyle, ESoundOcclusion, ESoundSlot, ESurfaceTypes, ETravelType, EUV2Mode |
Inherited Structures from Engine.Actor |
ActorRenderDataPtr, AnimRep, BatchReference, FireProperties, KRBVec, KRigidBodyState, KSimParams, LightRenderDataPtr, PointRegion, ProjectorRenderInfoPtr, StaticMeshProjectorRenderInfoPtr |
Delegates Summary |
| | OnComplete (HttpSock Sender) |
| | OnConnectError (HttpSock Sender) |
| | OnConnectionTimeout (HttpSock Sender) |
| | OnError (HttpSock Sender, string ErrorMessage, optional string Param1, optional string Param2) |
| bool | OnFollowRedirect (HttpSock Sender, HttpUtil.xURL NewLocation)) |
| | OnPreConnect (HttpSock Sender) |
| | OnRequestBody (HttpSock Sender) |
| | OnRequireAuthorization (HttpSock Sender, EAuthMethod method, array<GameInfo.KeyValuePair> info) |
| | OnRequireProxyAuthorization (HttpSock Sender, EAuthMethod method, array<GameInfo.KeyValuePair> info) |
| bool | OnResolved (HttpSock Sender, string hostname, InternetLink.IpAddr Addr)) |
| | OnResolveFailed (HttpSock Sender, string hostname) |
| bool | OnResponseBody (HttpSock Sender, string line)) |
| | OnReturnCode (HttpSock Sender, int ReturnCode, string ReturnMessage, string HttpVer) |
| | OnSendRequestHeaders (HttpSock Sender) |
Functions Summary |
| bool | Abort ()))
|
| bool | AddHeader (string hname, coerce string value, optional bool bNoReplace))
|
| bool | CachedResolve (coerce string hostname, optional bool bDontConnect))
|
| bool | clearFormData ()))
|
| | ClearRequestData (optional bool bDontClearAuth))
|
| | Closed ()))
|
| | CloseSocket ()))
|
| bool | CreateSocket ()))
|
| int | DataSize (array<string> data))
|
| | Destroyed ()))
|
| string | genAuthorization (EAuthMethod method, string Username, string Password, array<GameInfo.KeyValuePair> Info))
|
| string | genBasicAuthorization (string Username, string Password))
|
| string | genDigestAuthorization (string Username, string Password, array<GameInfo.KeyValuePair> Info))
|
| bool | get (string location))
|
| string | getHTTPversion ()))
|
| string | GetRequestHeader (string hname, optional coerce string def))
|
| string | GetReturnHeader (string hname, optional coerce string def))
|
| int | getTZoffset ()))
|
| string | GetValue (string key, array<GameInfo.KeyValuePair> Info, optional coerce string def))
|
| bool | head (string location))
|
| bool | HttpRequest (string location, string Method))
|
| bool | httrace (string location))
|
| | InternalResolved (InternetLink.IpAddr Addr, optional bool bDontCache))
|
| bool | IsAuthMethodSupported (EAuthMethod method))
|
| bool | IsSupportedMethod ()))
|
| | Logf (coerce string message, optional int level, optional coerce string Param1, optional coerce string Param2))
|
| int | now ()))
|
| bool | OpenConnection ()))
|
| | Opened ()))
|
| bool | post (string location, optional string PostData))
|
| bool | postex (string location, optional array<string> PostData))
|
| | PreBeginPlay ()))
|
| | ProccessWWWAuthenticate (string HeaderData, bool bProxyAuth))
|
| | ProcHeaders ()))
|
| | ProcInput (string inline))
|
| string | randString (optional int size, optional coerce string prefix))
|
| | ReceivedText (string Line ))
|
| bool | RemoveHeader (string hname))
|
| | ResolveFailed ()))
|
| | SendData (string data, optional bool bFlush))
|
| bool | setFormData (string field, coerce string data, optional string contentType, optional string contentEncoding))
|
| bool | setFormDataEx (string field, array<string> data, optional string contentType, optional string contentEncoding))
|
| bool | setHTTPversion (optional string newver))
|
| bool | ShouldFollowRedirect (int retc, string method))
|
| EAuthMethod | StrToAuthMethod (coerce string method))
|
| | Timer ()))
|
| string | UserAgent ()))
|
Inherited Functions from Engine.Actor |
*, +, -, AddToPackageMap, AdjustVolume, AllActors, AllowMusicPlayback, AnimBlendParams, AnimBlendToAlpha, AnimEnd, AnimIsInGroup, AnimStopLooping, Attach, AttachToBone, AutonomousPhysics, BaseChange, BasedActors, BecomeViewTarget, BeginEvent, BeginPlay, BlocksShotAt, BoneRefresh, BroadcastLocalizedMessage, Bump, CanSplash, ChangeBaseParamsFeedbackEffect, ChangeSpringFeedbackEffect, CheckForErrors, CheckMaxEffectDistance, ChildActors, ClearStayingDebugLines, ClientTrigger, Clock, CollidingActors, ConsoleCommand, CopyObjectToClipboard, Crash, CurrentLIPSincAnim, DebugClock, DebugUnclock, DemoPlaySound, Destroy, Destroyed, Detach, DetachFromBone, DisplayDebug, DrawDebugCircle, DrawDebugLine, DrawDebugSphere, DrawStayingDebugLine, DynamicActors, EffectIsRelevant, EnableChannelNotify, EncroachedBy, EncroachingOn, EndedRotation, EndEvent, Error, Falling, FastTrace, FellOutOfWorld, FinishAnim, FinishedInterpolation, FinishInterpolation, ForceFeedbackSupported, FreezeAnimAt, GainedChild, GetAllInt, GetAllIntDesc, GetAnimParams, GetBoneCoords, GetBoneRotation, GetCacheEntry, GetClosestBone, GetCollisionExtent, GetDebugName, GetHumanReadableName, GetLocalString, GetMapName, GetMeshName, GetNextInt, GetNextIntDesc, GetNextSkin, GetNotifyChannel, GetRenderBoundingSphere, GetRootLocation, GetRootLocationDelta, GetRootRotation, GetRootRotationDelta, GetSoundDuration, GetURLMap, GetUrlOption, HasAnim, HasLIPSincAnim, HealDamage, HitWall, HurtRadius, IsAnimating, IsInPain, IsInVolume, IsJoinedTo, IsPlayingLIPSincAnim, IsStationary, IsTweening, KAddAngularImpulse, KAddBoneLifter, KAddImpulse, KApplyForce, KDisableCollision, KDrawRigidBodyState, KEnableCollision, KFreezeRagdoll, KGetActorGravScale, KGetCOMOffset, KGetCOMPosition, KGetDampingProps, KGetFriction, KGetImpactThreshold, KGetInertiaTensor, KGetMass, KGetRBQuaternion, KGetRestitution, KGetRigidBodyState, KGetSimParams, KGetSkelMass, KilledBy, KImpact, KIsAwake, KIsRagdollAvailable, KMakeRagdollAvailable, KRBVecFromVector, KRBVecToVector, KRemoveAllBoneLifters, KRemoveLifterFromBone, KScaleJointLimits, KSetActorGravScale, KSetBlockKarma, KSetCOMOffset, KSetDampingProps, KSetFriction, KSetImpactThreshold, KSetInertiaTensor, KSetMass, KSetRestitution, KSetSimParams, KSetSkelVel, KSetStayUpright, KSetStayUprightParams, KSkelConvulse, KUpdateState, KVelDropBelow, KWake, Landed, LinkMesh, LinkSkelAnim, LIPSincAnimEnd, LockRootMotion, LoopAnim, LostChild, MakeNoise, MatchStarting, Move, MoveCacheEntry, MoveSmooth, NearSpot, NotifyLocalPlayerDead, NotifyLocalPlayerTeamReceived, OnlyAffectPawns, PauseStream, PawnBaseDied, PhysicsVolumeChange, PlayAnim, PlayerCanSeeMe, PlayFeedbackEffect, PlayLIPSincAnim, PlayMusic, PlayOwnedSound, PlaySound, PlayStream, PlayTeleportEffect, PostBeginPlay, PostLoadSavedGame, PostNetBeginPlay, PostNetReceive, PostTeleport, PostTouch, POVChanged, PreBeginPlay, PrecacheAnnouncer, PreSaveGame, PreTeleport, RadiusActors, RanInto, RecoverFromBadStateCode, RenderOverlays, RenderTexture, Reset, ResetStaticFilterState, SeekStream, SelfTriggered, SetAnimFrame, SetBase, SetBoneDirection, SetBoneLocation, SetBoneRotation, SetBoneScale, SetCollision, SetCollisionSize, SetDefaultDisplayProperties, SetDelayedDamageInstigatorController, SetDisplayProperties, SetDrawScale, SetDrawScale3D, SetDrawType, SetGRI, SetInitialState, SetLocation, SetOverlayMaterial, SetOwner, SetPhysics, SetRelativeLocation, SetRelativeRotation, SetRotation, SetStaticMesh, SetTimer, ShouldBeHidden, Sleep, Spawn, SpecialHandling, StartInterpolation, StopAllMusic, StopAnimating, StopFeedbackEffect, StopLIPSincAnim, StopMusic, StopStream, SuggestFallVelocity, TakeDamage, TeamLink, TextToSpeech, Tick, Timer, TimerPop, TornOff, Touch, TouchingActor, TouchingActors, Trace, TraceActors, TraceThisActor, TravelPostAccept, TravelPreAccept, Trigger, TriggerEvent, TweenAnim, UnClock, UnTouch, UnTrigger, UntriggerEvent, UpdateAnnouncements, UpdatePrecacheMaterials, UpdatePrecacheStaticMeshes, UpdateURL, UsedBy, VisibleActors, VisibleCollidingActors, ZoneChange |
const BUFFERSIZE = 2048;
const HTTP_CONNECT = "CONNECT";
const HTTP_DELETE = "DELETE";
const HTTP_GET = "GET";
const HTTP_HEAD = "HEAD";
const HTTP_OPTIONS = "OPTIONS";
const HTTP_POST = "POST";
const HTTP_PUT = "PUT";
const HTTP_TRACE = "TRACE";
const VERSION = 401;
var protected array<string> authBasicLookup;
var protected bool bAuthTrap;
var protected bool bIsChunked;
var protected int BoundPort;
var protected bool bTempProxyOverride;
var protected bool bTimeout;
var protected bool bUseTempProxy;
var protected int chunkedCounter;
var protected string CRLF;
var protected int CurRedir;
var const string EXTENTION;
var protected bool FollowingRedir;
var protected
class<
HttpLink> HttpLinkClass;
var protected string HTTPVER;
var protected string inBuffer;
var int LastStatus;
var protected string MultiPartBoundary;
var protected string outBuffer;
var protected bool procHeader;
var array<string> RequestData;
var float RequestDuration;
var array<string> RequestHeaders;
var string RequestMethod;
var protected string ResolveHostname;
var array<string> ReturnData;
var array<string> ReturnHeaders;
var protected float StartRequestTime;
var protected int TZoffset;
Authentication
var(Authentication) bool bAutoAuthenticate;
Options
var(Options) bool bFollowRedirect;
var(Options) config bool bProcCookies;
var(Options) bool bRfcCompliantRedirect;
var(Options) config bool bSendCookies;
var(Options) config float fConnectTimout;
var(Options) config int iMaxRedir;
var(Options) config int iVerbose;
Proxy
var(Proxy) globalconfig bool bUseProxy;
var(Proxy) globalconfig int iProxyPort;
var(Proxy) globalconfig string sProxyHost;
var(Proxy) globalconfig string sProxyPass;
var(Proxy) globalconfig string sProxyUser;
URL
var(
URL)
string DefaultAccept;
XferMode
var(XferMode) config int iMaxBytesPerTick;
var(XferMode) config int iMaxIterationsPerTick;
enum
EAuthMethod
{
AM_None,
AM_Unknown,
AM_Basic,
AM_Digest,
};
enum
HTTPState
{
HTTPState_Resolving,
HTTPState_Connecting,
HTTPState_SendingRequest,
HTTPState_WaitingForResponse,
HTTPState_ReceivingData,
HTTPState_Closed,
};
struct
RequestHistoryEntry
{
var deprecated string Hostname;
var int HTTPresponse;
var deprecated string Location;
var string Method;
var HttpUtil.xURL URL;
};
delegate OnConnectError (
HttpSock Sender )
delegate OnConnectionTimeout (
HttpSock Sender )
delegate OnError (
HttpSock Sender,
string ErrorMessage, optional
string Param1, optional
string Param2 )
delegate OnPreConnect (
HttpSock Sender )
delegate OnRequestBody (
HttpSock Sender )
OnRequireAuthorization Source code
OnRequireProxyAuthorization Source code
delegate OnResolveFailed (
HttpSock Sender,
string hostname )
delegate
bool OnResponseBody (
HttpSock Sender,
string line) )
delegate OnReturnCode (
HttpSock Sender,
int ReturnCode,
string ReturnMessage,
string HttpVer )
delegate OnSendRequestHeaders (
HttpSock Sender )
function bool Abort ( ) )
function bool AddHeader ( string hname, coerce string value, optional bool bNoReplace) )
protected function bool CachedResolve ( coerce string hostname, optional bool bDontConnect) )
function bool clearFormData ( ) )
function ClearRequestData ( optional bool bDontClearAuth) )
function Closed ( ) )
function CloseSocket ( ) )
function bool CreateSocket ( ) )
function int DataSize ( array<string> data) )
event Destroyed ( ) )
protected function string genBasicAuthorization ( string Username, string Password) )
genDigestAuthorization Source code
protected function
string genDigestAuthorization (
string Username,
string Password, array<
GameInfo.
KeyValuePair>
Info) )
function bool get ( string location) )
function string getHTTPversion ( ) )
function string GetRequestHeader ( string hname, optional coerce string def) )
function string GetReturnHeader ( string hname, optional coerce string def) )
function int getTZoffset ( ) )
function bool head ( string location) )
protected function bool HttpRequest ( string location, string Method) )
function bool httrace ( string location) )
function InternalResolved (
InternetLink.IpAddr
Addr , optional
bool bDontCache) )
static function
bool IsAuthMethodSupported (
EAuthMethod method) )
protected function bool IsSupportedMethod ( ) )
function Logf ( coerce string message, optional int level, optional coerce string Param1, optional coerce string Param2) )
function int now ( ) )
protected function bool OpenConnection ( ) )
function Opened ( ) )
function bool post ( string location, optional string PostData) )
function bool postex ( string location, optional array<string> PostData) )
event PreBeginPlay ( ) )
ProccessWWWAuthenticate Source code
protected function ProccessWWWAuthenticate ( string HeaderData, bool bProxyAuth) )
protected function ProcHeaders ( ) )
protected function ProcInput ( string inline) )
static function string randString ( optional int size, optional coerce string prefix) )
function ReceivedText ( string Line ) )
function bool RemoveHeader ( string hname) )
function ResolveFailed ( ) )
protected function SendData ( string data, optional bool bFlush) )
function bool setFormData ( string field, coerce string data, optional string contentType, optional string contentEncoding) )
function bool setFormDataEx ( string field, array<string> data, optional string contentType, optional string contentEncoding) )
function bool setHTTPversion ( optional string newver) )
protected function bool ShouldFollowRedirect ( int retc, string method) )
static function
EAuthMethod StrToAuthMethod ( coerce
string method) )
function Timer ( ) )
function string UserAgent ( ) )
defaultproperties
{
EXTENTION=""
iVerbose=-1
iLocalPort=0
bFollowRedirect=true
bRfcCompliantRedirect=true
curState=HTTPState_Closed
iMaxRedir=5
HTTPVER="1.1"
DefaultAccept="text/*"
bSendCookies=true
bProcCookies=true
bUseProxy=false
fConnectTimout=60
HttpLinkClass=class'HttpLink'
HttpCookieClass=class'HttpCookies'
TransferMode=TM_Normal
iMaxIterationsPerTick=32
iMaxBytesPerTick=4096
AuthMethod=AM_None
bAutoAuthenticate=true
}
|
Creation time: Sa 23.8.2014 09:18:15.283 - Created with
UnCodeX