BRL.GNet: | Functions | Modinfo | Source |
Function CloseGNetHost( host:TGNetHost ) | |
Description | Close a GNet host. |
Information | Once closed, a GNet host cannot be reopened. |
Function CloseGNetObject( obj:TGNetObject ) | |
Description | Close a GNet object. |
Function CreateGNetHost:TGNetHost() | |
Returns | A new GNet host. |
Description | Create GNet host. |
Information | Once you have created a GNet host, you can use it to create objects with CreateGNetObject, connect to other hosts with GNetConnect and listen for connections from other hosts with GNetListen. |
Function CreateGNetMessage:TGNetObject( host:TGNetHost ) | |
Returns | A new GNet object. |
Description | Create a GNet message object. |
Function CreateGNetObject:TGNetObject( host:TGNetHost ) | |
Returns | A new GNet object. |
Description | Create a GNet object. |
Function GetGNetFloat#( obj:TGNetObject,index ) | |
Description | Get GNet object float data. |
Function GetGNetInt( obj:TGNetObject,index ) | |
Description | Get GNet object int data. |
Function GetGNetString$( obj:TGNetObject,index ) | |
Description | Get GNet object string data. |
Function GetGNetTarget:Object( obj:TGNetObject ) | |
Returns | The currently bound target object. |
Description | Get a GNet object's target object. |
Function GNetConnect( host:TGNetHost,address$,port,timeout_ms=10000 ) | |
Returns | True if connection successful, otherwise false. |
Description | Connect to a remote GNet host. |
Information | Attempts to connect host to the specified remote address and port. A GNet host must be listening (see GNetListen) at the specified address and port for the connection to succeed. |
Function GNetListen( host:TGNetHost,port ) | |
Returns | True if successful, otherwise false. |
Description | Listen for connections. |
Information | Causes host to start listening for connection attempts on the specified port.
Once a host is listening, hosts on other machines can connect using GNetConnect. GNetListen may fail if port is already in use by another application, or if host is already listening or has already connected to a remote host using GNetConnect. |
Function GNetMessageObject:TGNetObject( msg:TGNetObject ) | |
Returns | The object that msg was sent to. |
Description | Get message target object. |
Function GNetMessages:TList( host:TGNetHost ) | |
Returns | A linked list. |
Description | Get a list of GNet messages sent to local objects. |
Function GNetObjectLocal( obj:TGNetObject ) | |
Returns | True if object is a local object. |
Description | Determine whether a GNet object is local. |
Function GNetObjectRemote( obj:TGNetObject ) | |
Returns | True if object is a remote object. |
Description | Determine whether a GNet object is remote. |
Function GNetObjects:TList( host:TGNetHost,state=GNET_ALL ) | |
Returns | A linked list. |
Description | Get a list of GNet objects. |
Information | GNetObjects returns a list of GNet objects in a certain state. The state parameter controls which objects are listed, and can be one of GNET_ALL, GNET_CREATED, GNET_MODIFIED or GNET_CLOSED. Note that with the exception of GNET_ALL, the returned lists will only ever contain remote objects. |
Function GNetObjectState( obj:TGNetObject ) | |||||||||||||||
Returns | An integer state. | ||||||||||||||
Description | Get state of a GNet object. | ||||||||||||||
Information | The returned value can be one of the following:
|
Function GNetSync( host:TGNetHost ) | |
Description | Synchronize GNet host. |
Information | GNetSync will update the state of all GNet objects. Once you have used this command, use the GNetObjects function to determine which objects have been remotely created, modified or closed. |
Function SendGNetMessage( msg:TGNetObject,toObject:TGNetObject ) | |
Description | Send a GNet message to a remote object. |
Function SetGNetFloat( obj:TGNetObject,index,value# ) | |
Description | Set GNet object float data. |
Function SetGNetInt( obj:TGNetObject,index,value ) | |
Description | Set GNet object int data. |
Function SetGNetString( obj:TGNetObject,index,value$ ) | |
Description | Set GNet object string data. |
Function SetGNetTarget( obj:TGNetObject,target:Object ) | |
Description | Set a GNet object's target object. |
Information | This command allows you to bind an abitrary object to a GNet object. |
Version | 1.05 |
---|---|
Author | Mark Sibly |
License | Blitz Shared Source Code |
Copyright | Blitz Research Ltd |
Modserver | BRL |
History | 1.05 Release |
History | Some doc fixes |
History | 1.04 Release |
Histort | Fixed low level send/recv leaks |
History | 1.03 Release |
History | Now uses Pub.ENet |
History | 1.02 Release |
History | Fixed Closing host not closing server socket |
History | 1.01 Release |