-
Notifications
You must be signed in to change notification settings - Fork 1
Network documentation
Client class for the Network library. This class allow the user to start a transmission in order to receive and send requests to a single Server.
Static callback method for the server request
Static name for the communication channel
Destructor of the Client. When called, it'll shutdown all the transmissions
Getter for the singleton instance of a Client
Send an object to the server (you will minimum need "public string name" in your object
| Name | Description |
|---|---|
| data |
System.Object |
Trigered function when the server want to communicate with the Monitor
| Name | Description |
|---|---|
| header |
NetworkCommsDotNet.PacketHeader |
| connection |
NetworkCommsDotNet.Connections.Connection |
| data |
System.String Data send by the server |
Launch the ClientNetwork
| Name | Description |
|---|---|
| channel |
System.String Name of the channel which will be used for the communication |
| callBackFct |
System.Func{Network.NetTools.Packet,System.Int32} Function called when the client receive a message from the server |
| serverIP |
System.String Ip of the server you want to connect to |
| serverPort |
System.Int32 Port of the server you want to connect to |
Event add token
Event add tree
| Name | Description |
|---|---|
| source_ |
Network.Events.HttpEventSource |
| type_ |
Network.Events.HttpEventType |
| owner_ |
Network.NetTools.User |
| data_ |
System.Object |
Event add tree
Event add tree
| Name | Description |
|---|---|
| source_ |
Network.Events.HttpEventSource |
| type_ |
Network.Events.HttpEventType |
| owner_ |
Network.NetTools.User |
| data_ |
System.Object |
Event add user
Event add user
| Name | Description |
|---|---|
| source_ |
Network.Events.HttpEventSource |
| type_ |
Network.Events.HttpEventType |
| owner_ |
Network.NetTools.User |
| data_ |
System.Object |
Abstract class used to represent the body of an event in the AREA app
Main constructor for Event objects
| Name | Description |
|---|---|
| source_ |
Network.Events.HttpEventSource The source type (HttpEventSource) |
| type_ |
Network.Events.HttpEventType The event type (HttpEventType) |
| owner_ |
Network.NetTools.User Some basics informations about the event's owner |
| data_ |
System.Object Some basics informations about the event's data |
Defines the date of the creation for the event
Indicate some basics informations about the event's owner
Indicate some basics informations about the event's owner
Defines the source type of the event
Defines the type of the event
Event for recuperation of available services
Get available services
| Name | Description |
|---|---|
| source_ |
Network.Events.HttpEventSource |
| type_ |
Network.Events.HttpEventType |
| owner_ |
Network.NetTools.User |
| data_ |
System.Object |
Defines the basic object used for handling answer from the server
Represent the answer as a data
Creates a specific HttpEventAnswer with a predefined pattern used for errors.
| Name | Description |
|---|---|
| e |
Network.Events.Event The source event used for generating the answer |
| code |
System.Int32 The error code |
| message |
System.String The error message |
Defines the source event used for generating the answer
Http status with a code and a message
Creates a specific HttpEventAnswer with a predefined pattern used for success status.
| Name | Description |
|---|---|
| e |
Network.Events.Event The source event used for generating the answer |
| message |
System.String The error message |
Defines the differents sources which can be used to create an Event
Represent an internal source
Event instanciate in the message bus
Represent an external client
Represent an event created in a service
Defines a data model used to store an http status
Code of the status
Message of the status
Defines the differents type which can be used to create an Event
Can be assimilated to a POST method
Can be assimilated to a GET method
Used to manipulate integrity of instances
Event add user
| Name | Description |
|---|---|
| source_ |
Network.Events.HttpEventSource |
| type_ |
Network.Events.HttpEventType |
| owner_ |
Network.NetTools.User |
| data_ |
System.Object |
Defines the network information for a server's client.
A System.String for the IP of the client
An System.Int32 for the port of the client
Class designed to lock and unlock asynchronous event. Usually managed by a LockManager.
Second constructor of the Locker, allowing the user to customize the timeout duration.
| Name | Description |
|---|---|
| key_ |
System.UInt32 The unique key code of the Locker |
| username_ |
System.String The username of the Locker's owner |
| duration_ |
System.Int32 The duration of the lock period timeout. |
Main constructor of the Locker
| Name | Description |
|---|---|
| key_ |
System.UInt32 The unique key code of the Locker |
| username_ |
System.String The username of the Locker's owner |
Getter and Setter for the timeout duration of the Locker
Getter and Setter for the Locker key
Getter and Setter for the current State of the Locker
Getter and Setter for the Username of the owner of the Locker
Class used to store, delete, lock and unlock Locker
Add a new Locker in the manager
| Name | Description |
|---|---|
| username |
System.String The owner of the Locker |
| duration |
System.Int32 A duration |
This method return the generated key of the Locker
Add a new Locker in the manager. This method set the duration to infinite (-1)
| Name | Description |
|---|---|
| username |
System.String The owner of the Locker |
This method return the generated key of the Locker
Delete the locker associated to the key given in parameter
| Name | Description |
|---|---|
| key |
System.UInt32 The key of the Locker |
True if the Locker has been successfully deleted, false otherwise.
Lock the Locker linked to the key given in parameter and wait for a call to LockManager.Unlock(System.UInt32)
| Name | Description |
|---|---|
| key |
System.UInt32 The key of the Locker |
False if no Locker has been found with this key, true otherwise
Getter and Setter for the Dictionnary of Lockers, which assign an System.UInt32 key to its Locker
Unlock the Locker linked to the key given in parameter.
| Name | Description |
|---|---|
| key |
System.UInt32 The key of the Locker |
False if the manager does not contain a Locker with this key, true otherwise
Defines a node in the AREA's tree structure
Constructor of ANode
A list of the ANode children
The data contained in the ANode
Defines the data stored in an ANode
Constructor of the ANodeData
The ANode's event name
The ANode's name
The ANode's position in the canvas
The ANode's service name
The ANode's type ("action" or "reaction")
Defines all AREAs for an User
Constructor of AreaTree
| Name | Description |
|---|---|
|
System.String The User's email |
The list of all AREAs for the User
The User's email
The MongoDB.Bson.ObjectIdUser's identifier
Defines an AREA
Constructor of ATreeRoot
| Name | Description |
|---|---|
| name |
System.String The ATreeRoot's name |
The ATreeRoot's name
The root for the tree structure
The content of an Event
The content of the Event
The name of the Event
The type of the Event
The interface for a service
Return the name of the API
Get the list of actions
A list of actions
Get the callback
A Callback
Get the list of reactions
A list of reactions
Get the users list by action
| Name | Description |
|---|---|
| action |
System.String An action |
A list of users
Get the users list by reaction
| Name | Description |
|---|---|
| reaction |
System.String An reaction |
A list of users
Class used to transfer data across the network.
Default constructor for a Packet
Main constructor for client side. The key is initialized to 0 and the registration state to false.
| Name | Description |
|---|---|
| name_ |
System.String The name of the emitter. |
| command_ |
Network.NetTools.PacketCommand The command associated to data_ |
| data_ |
System.Object The System.Object which contain the data |
Main constructor for server side, the key must be initialized with a value.
| Name | Description |
|---|---|
| name_ |
System.String The name of the emitter. For server side, it will be "root" |
| key_ |
System.UInt32 The value of the Locker key |
| command_ |
Network.NetTools.PacketCommand The command associated to data_ |
| data_ |
System.Object The System.Object which contain the data |
Access the Data of the Packet
Access the Network.Lock.Locker's key of the Packet
Access the name of the packet's author
Enum used to defined the type of the Packet's System.Object
Communication direction: Server => Client. Ask the client to execute an action. The object associated to the command must be an Network.Events.Event (which is the action to execute and his paramaters).
Communication direction: Client => Server. Request a register from a Client to the Server. The object associated to the command must be a System.String (which is the server's password).
Communication direction: Both. Inform a network entity about an error that occured. The object associated to the command must be a System.String.
Communication direction: Client => Server. Send to the message bus the fact that an reaction has been triggered. The object associated to the command must be an ReactionRegisterContent (which is the reaction and the user link to a reaction).
Communication direction: Server => Client. Ask the client to link a reaction to an user. The object associated to the command must be an Network.Events.Event (which is the reaction to launch and his paramaters).
A basic structure defining a 2D Position with System.Int32 variables
Constructor of Point
The X position
The X position
The content of an reaction register
The owner of the ReactionRegisterContent
The reaction's name
The service's name
Service like (Facebook, Twitter, Slack...)
Constructor for a Service
| Name | Description |
|---|---|
| name_ |
System.String The Service's name |
| accessTokenSecret_ |
System.Boolean The Service needs an AccessTokenSecret |
| actions_ |
System.Collections.Generic.Dictionary{System.String,Network.NetTools.ServiceType} The Service's actions |
| reactions_ |
System.Collections.Generic.Dictionary{System.String,Network.NetTools.ServiceType} The Service's reactions |
| infos_ |
Network.InfosClient The Service's infos client |
The Service needs an AccessTokenSecret
The Service's actions
The Service's infos client
The Service's name
The Service's reactions
This class is used by the server to ask a service to execute an action, or link a reaction.
Constructor of the ServiceActionContent class.
| Name | Description |
|---|---|
| name |
System.String The name of the ServiceActionContent |
| user |
Network.NetTools.User An user |
| args |
System.Object The ServiceActionContent's arguments |
Return the args needed to the launch the action function.
Return the name of the action to execute.
This class is used by a service to inform the Server that an action has been triggered and that a reaction has been created.
Constructor of the ServiceActionContent class.
| Name | Description |
|---|---|
| name |
System.String The name of the reaction. |
| user |
Network.NetTools.User Informations about the user. |
| reactionContent |
System.Object Contents about the reaction. |
| service |
System.String The name of the service. |
Return the name of the action to execute.
Return an object containing some content about the reaction.
Return the name of the service.
Return the args needed to the launch the action function.
An System.Enum defining a service type
The service is an action
The service is an reaction
User information
Constructor for User
| Name | Description |
|---|---|
|
System.String The User's email |
|
| pwd |
System.String The User's password |
The User's standard tokens
The User's secret tokens
Check if User's tokens are expired
A System.Boolean if tokens are expired or not
The User's email
The MongoDB.Bson.ObjectIdUser's identifier
The last updated System.DateTime for the User's tokens
The User's password
Defines a Server class for the Nexus Network library.
Remove a monitor from the connected users by it's name
| Name | Description |
|---|---|
| name |
System.String The name of the monitor which will be removed |
Remove a monitor from the connected users by it's name
| Name | Description |
|---|---|
| name |
System.String The name of the service which will be removed |
A list of EventContent defining an event flow
Destructor for the Server class. It will shutdwon the connection.
Get ip of the pc
A getter and a setter for the server singleton instance
A getter and a setter for the stored LockerManager wich will manage all the synchronous network operations
Callback called when the messagebus got a new message
| Name | Description |
|---|---|
| header |
NetworkCommsDotNet.PacketHeader |
| connection |
NetworkCommsDotNet.Connections.Connection |
| data |
System.String |
Callback used for the communication with the message bus
Callback called when a monitor send some data
| Name | Description |
|---|---|
| header |
NetworkCommsDotNet.PacketHeader |
| connection |
NetworkCommsDotNet.Connections.Connection |
| data |
System.String |
Callback used for the communication with the monitors
The list of monitors
List of monitors currently connected to the server
The list of old services
Send some data to a monitor
| Name | Description |
|---|---|
| data |
Network.NetTools.Packet Data sent to the monitor |
Send some data (as NetTools.Packet to a monitor by its name
| Name | Description |
|---|---|
| name |
System.String Name of the monitor |
| data |
Network.NetTools.Packet Data sent to the monitor |
Send some data (as NetTools.Packet to a monitor by its ip and port
| Name | Description |
|---|---|
| ip |
System.String IP address of the monitor |
| port |
System.Int32 Port of the monitor |
| data |
Network.NetTools.Packet Data sent to the monitor |
Send some data to the services through the message bus channel
| Name | Description |
|---|---|
| data |
Network.NetTools.Packet Dqtq sent to the services |
Send a Message Bus Event Core
| Name | Description |
|---|---|
| data |
Network.NetTools.Packet Data sent to the monitor |
| ip |
System.String IP address of the monitor |
| port |
System.Int32 Port of the monitor |
Send a message bus event to a NetTools.Service
| Name | Description |
|---|---|
| data |
Network.NetTools.Packet Data sent to the monitor |
| serviceName |
System.String A NetTools.Service name |
Server password used for monitors and services registration
The list of services
Init and start the server
| Name | Description |
|---|---|
| mrcb |
System.Func{Network.NetTools.Packet,System.Int32} Callback used for monitors requests |
| mbncb |
System.Func{Network.NetTools.Packet,System.Int32} Callback used for message bus requests |
| pass |
System.String Password of the server |
Stop the server by closing all packet handlers and stop the request listening. It also delete all the client's infos