XGConnection.h
OverviewThis header file describes the interface to an object which represents the connection between an Xgrid client and an Xgrid controller. The XGConnection class is created by an Xgrid client using the name or address of a controller. The connection can be in one of four states, and a collection of constants is declared which are used describe which state a connection is in. An authenticator can be set on the connector, which allows the connection to be authenticated. A delegate may be set on the connection, and will receive callbacks when connection events occur, prior to the notification of key-value observers. Classes
CategoriesConstants
XGConnectionKeyIsClosedThe key for the "isClosed" property of XGConnection. extern NSString * const XGConnectionKeyIsClosed ;
XGConnectionKeyIsOpenedThe key for the "isOpened" property of XGConnection. extern NSString * const XGConnectionKeyIsOpened ;
XGConnectionKeyStateThe key for the "state" property of XGConnection. extern NSString * const XGConnectionKeyState ;
TypedefsXGConnectionStatetypedef enum { XGConnectionStateClosed, XGConnectionStateOpening, XGConnectionStateOpen, XGConnectionStateClosing } XGConnectionState ; Constants
DiscussionThe XGConnectionState enum defines constants that are used by the connection to specify which state it is in. A connection begins in the Closed state. After receiving the -open message the connection enters the Opening state. If the connection succeeds at opening then the state becomes Open. If the connection fails to open while in the Opening state, or if the connection encounters an error while it is Open, or if the connection receives the -close message, then the state will become Closing, and then Closed.
|