Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

LibHTTP4.HttpCache

Extends
Info
Modifiers
config ( HttpCache ) ParseConfig dependsOn ( HttpUtil )

HttpCache
Disk\Memory cache for LibHTTP, it will handle caching of data. To use it simply create a HttpCache object and use it's get() request to get updated documents. Don't use a HttpSock instance for this.
When using this class it will perform a specially constructed get request when it's needed, it will try to satisfy the caching headers returned by the server. Ihis class is only usefull if you know the remote server returns correct cachable data. By default most dynamic pages (ASP, PHP, Perl, CGI) will return non-cachable pages.

Dcoumentation and Information: http://wiki.beyondunreal.com/wiki/LibHTTP

Authors: Michiel 'El Muerte' Hendriks <elmuerte@drunksnipers.com>

Copyright 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.HttpCache

Constants Summary
Inherited Contants from Engine.Actor
MAXSTEPHEIGHT, MINFLOORZ

Variables Summary
array<CacheInfoRecord>CacheList
array<HttpCacheObject>CacheObjectList
class<HttpCacheObject>HttpCacheObjectClass
class<HttpSock>HttpSockClass
array<CacheRequest>Requests
Options
intiCacheLimit
Inherited Variables from Engine.Info
BotsGroup, ChatGroup, GameGroup, KickVoteGroup, MapVoteGroup, RulesGroup, ServerGroup
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
ECacheFailError
CF_None, CF_BadRequest, CF_AuthRequired, CF_Timeout, CF_ResolveFailed, CF_Busy, CF_Unknown,
EDataOrigin
DO_Unknown, DO_Cache, DO_Initial, DO_Refresh,
Inherited Enumerations from Engine.Actor
EDoubleClickDir, EDrawType, EFilterState, EFlagState, EForceType, eKillZType, ELightEffect, ELightType, EMusicTransition, ENetRole, EPhysics, ERenderStyle, ESoundOcclusion, ESoundSlot, ESurfaceTypes, ETravelType, EUV2Mode

Structures Summary
CacheInfoRecord
URL, Hash, DataSize, LastUpdate, colidx
CacheRequest
Socket, idx
Inherited Structures from Engine.Actor
ActorRenderDataPtr, AnimRep, BatchReference, FireProperties, KRBVec, KRigidBodyState, KSimParams, LightRenderDataPtr, PointRegion, ProjectorRenderInfoPtr, StaticMeshProjectorRenderInfoPtr

Delegates Summary
delegate OnComplete (HttpCache Sender, HttpCacheObject Data, EDataOrigin origin)
delegate OnCreateSock (HttpCache Sender, HttpSock Socket)
delegate OnError (HttpCache Sender, string ErrorMessage, optional string Param1, optional string Param2)
delegate OnFail (HttpCache Sender, int idx, ECacheFailError reason)

Functions Summary
function CacheCleanup ()))
functionint createHash (string URL))
function DownloadComplete (HttpSock Sender))
function DownloadError (HttpSock Sender, string ErrorMessage, optional string Param1, optional string Param2))
function DownloadTimeout (HttpSock Sender))
functionint findCacheRecord (int hash))
functionint get (string location))
functionHttpCacheObject getCacheObject (int idx))
functionbool getURLbyId (int id, out string URL))
functionbool isCached (string location))
event PreBeginPlay ()))
function ResolveFailed (HttpSock Sender, string hostname))
Inherited Functions from Engine.Info
AcceptPlayInfoProperty, AllowClassRemoval, FillPlayInfo, GetDescriptionText, GetSecurityLevel
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


Variables Detail

CacheList Source code

var protected config array<CacheInfoRecord> CacheList;
cache list, each entry is an URL

CacheObjectList Source code

var protected array<HttpCacheObject> CacheObjectList;
the spawned cache objects

HttpCacheObjectClass Source code

var class<HttpCacheObject> HttpCacheObjectClass;

HttpSockClass Source code

var class<HttpSock> HttpSockClass;

Requests Source code

var protected array<CacheRequest> Requests;
running requests

Options

iCacheLimit Source code

var(Options) globalconfig int iCacheLimit;
maximum cache size (entries?)


Enumerations Detail

ECacheFailError Source code

enum ECacheFailError
{
CF_None, CF_BadRequest, CF_AuthRequired, CF_Timeout, CF_ResolveFailed, CF_Busy, CF_Unknown,
};
Reasons for a failure

EDataOrigin Source code

enum EDataOrigin
{
DO_Unknown, DO_Cache, DO_Initial, DO_Refresh,
};
Hints where the data came from


Structures Detail

CacheInfoRecord Source code

struct CacheInfoRecord
{
var int colidx;
var int DataSize;
var int Hash;
var int LastUpdate;
var HttpUtil.xURL URL;
};
records of the cached entries
colidx:
index in the CacheObjectList, volatile
DataSize:
last datazie
Hash:
hash used for record info
LastUpdate:
last update
URL:
the request URL

CacheRequest Source code

struct CacheRequest
{
var int idx;
var HttpSock Socket;
};



Delegates Detail

OnComplete Source code

delegate OnComplete ( HttpCache Sender, HttpCacheObject Data, EDataOrigin origin )
Will be called when the operation was completed successfully.

OnCreateSock Source code

delegate OnCreateSock ( HttpCache Sender, HttpSock Socket )
Will be called after the HttpSock instance has been created. Use it to set certain variables and delegates for the HttpSock.
Note: You shouldn't set any delegates in the sccket, most will be overwritten anyway.

OnError Source code

delegate OnError ( HttpCache Sender, string ErrorMessage, optional string Param1, optional string Param2 )
Will be called in case of an internal error.

OnFail Source code

delegate OnFail ( HttpCache Sender, int idx, ECacheFailError reason )
failed to complete the request, will be called when everything fails


Functions Detail

CacheCleanup Source code

protected function CacheCleanup ( ) )
Clean up the cache

createHash Source code

static final function int createHash ( string URL) )
return the hash of the URL

DownloadComplete Source code

protected function DownloadComplete ( HttpSock Sender) )

DownloadError Source code

protected function DownloadError ( HttpSock Sender, string ErrorMessage, optional string Param1, optional string Param2) )

DownloadTimeout Source code

protected function DownloadTimeout ( HttpSock Sender) )

findCacheRecord Source code

protected function int findCacheRecord ( int hash) )
find an idx using a hash

get Source code

function int get ( string location) )
Performs a get request. Returns the ID of the request. This Id can be used in to retrieve the URL in the future

getCacheObject Source code

protected function HttpCacheObject getCacheObject ( int idx) )
get\create a CacheObject

getURLbyId Source code

function bool getURLbyId ( int id, out string URL) )
Returns the URL for a certain ID. Result will be false when the ID is no longer valid.

isCached Source code

function bool isCached ( string location) )
Returns true when the location is cached

PreBeginPlay Source code

event PreBeginPlay ( ) )

ResolveFailed Source code

protected function ResolveFailed ( HttpSock Sender, string hostname) )


Defaultproperties

defaultproperties
{
    HttpSockClass=class'HttpSock'
    HttpCacheObjectClass=class'HttpCacheObject'
    
    iCacheLimit=524288
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Creation time: Do 14.8.2014 09:58:08.595 - Created with UnCodeX