NetEventclass

tadsnet.t[39]

Superclass
Tree

Subclass
Tree

Global
Objects

Property
Summary

Method
Summary

Property
Details

Method
Details

A NetEvent instance describes an event read via the getNetEvent() function.

In most cases, this base class will not be instantiated directly. getNetEvent() will always construct the appropriate subclass for the specific type of event being generated, if that subclass is defined in the game program. However, it’s possible that the game won’t define all necessary subclasses. For example, a game written for version 1 of the networking package wouldn’t include new subclasses added in version 2, because those subclasses weren’t defined at the time the game was written. When getNetEvent() needs to instantiate a subclass that isn’t defined in the game program, it will instead create a base NetEvent object, which will simply store the subclass-specific arguments as a list. This could be useful for debugging purposes, because it will at least let the programmer inspect the event details with the interactive debugger.

class NetEvent :   object

Superclass Tree   (in declaration order)

NetEvent
`         object`

Subclass Tree  

NetEvent
NetReplyDoneEvent
NetReplyEvent
NetRequestEvent
NetTimeoutEvent

Global Objects  

(none)

Summary of Properties  

evArgs evType

Summary of Methods  

construct

Properties  

evArgs

tadsnet.t[66]

Extra event-specific arguments. This is primarily for debugging purposes, since it’s only used when getNetEvent() needs to construct a NetEvent subclass that isn’t defined in the game. In this case, the absence of a subclass definition in the game presumably means that the game isn’t written to handle the type of event generated (for example, because it was written for an older interpreter version that didn’t have the event type).

evType

tadsnet.t[44]

The event type. This is a NetEvXxx value (see tadsnet.h) indicating which type of event this is.

Methods  

construct (t, [args])

tadsnet.t[51]

Construction. getNetEvent() only constructs this object directly when the subclass it’s looking for isn’t defined in the game program.

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3