Method | Description | |
---|---|---|
Dispose ( ) : void | ||
Emit ( Channel channel, Newtonsoft.Json.Linq.JObject data, bool global = false ) : void |
Emit a message to all listeners
|
|
GetCurrentMode ( ) : Mode | ||
SetMode ( Mode mode ) : void |
Set the mode of the bus instance. Upon calling this method, the IPC interface will initialize.
|
|
Subscribe ( Channel channel, Action |
Register an action with a channel. When a message is recieved on this channel, the method will be called.
|
|
Unsubscribe ( Channel channel, Action |
Unregister an action from a channel
|
Method | Description | |
---|---|---|
Emit ( Channel channel, string data, bool global = false ) : void |
Emit a message to all listeners
|
|
EmitMessageFromSocket ( string message ) : void |
Parse a message recieved in the socket and emit it to channels confined in its instance
|
|
Initializesocket ( ) : void |
Initiate the socket that connects to all other FOG bus instances It MUST be assumed that this socket is compromised Do NOT send security relevant data across it
|
|
SendMessage ( string msg ) : void |
Send a message to other bus instances
|
|
client_connect ( WebSocketSession clientSession ) : void | ||
socket_RecieveMessage ( WebSocketSession session, string value ) : void |
Called when the socket client recieves a message
|
|
socket_RecieveMessage ( object sender, WebSocket4Net.MessageReceivedEventArgs messageReceivedEventArgs ) : void |
Called when the server socket recieves a message It will replay the message to all other instances, including the original sender unless told otherwise
|
public static Emit ( Channel channel, Newtonsoft.Json.Linq.JObject data, bool global = false ) : void | ||
channel | Channel | The channel to emit on |
data | Newtonsoft.Json.Linq.JObject | The data to send |
global | bool | Should the data be sent to other processes |
return | void |
public static Subscribe ( Channel channel, Action |
||
channel | Channel | The channel to register within |
action | Action |
The action (method) to register |
return | void |
public static Unsubscribe ( Channel channel, Action |
||
channel | Channel | |
action | Action |
|
return | void |