C# Class NetMessenger, ThreeDWorld

Manages connections with all clients
Inheritance: MonoBehaviour
Show file Open project: dicarlolab/ThreeDWorld Class Usage Examples

Public Properties

Property Type Description
avatarPrefab Avatar
clientInfo RequestSocket
clientSimulation RequestSocket
debugNetworkMessages bool
environmentScene string
hostAddress string
logSimpleTimeInfo bool
logTimingInfo bool
portNumber string
portNumber_info string
saveDebugImageFiles bool
shouldCreateServer bool
shouldCreateTestClient bool
usePngFiles bool

Public Methods

Method Description
AreAllAvatarsReady ( ) : bool
CreateJoinMsgJson ( ) : JsonData
CreateMsgJson ( string msgType ) : JsonData
GetAllAvatars ( ) : List
GetServerForClient ( RequestSocket client ) : ResponseSocket
HandleClientFrameMessage ( RequestSocket client, NetMQMessage msg ) : void
HandleFrameMessage ( ResponseSocket server, NetMQMessage msg ) : void
Init ( string hostAddress, string portNumber, bool shouldCreateTestClient, bool shouldCreateServer, bool debugNetworkMessages, bool logSimpleTimingInfo, bool logDetailedTimeInfo, string preferredImageFormat, bool saveDebugImageFiles, string environmentScene ) : void
Init ( string hostAddress, string portNumber, string portNumber_info, bool shouldCreateTestClient, bool shouldCreateServer, bool debugNetworkMessages, bool logSimpleTimingInfo, bool logDetailedTimeInfo, string preferredImageFormat, bool saveDebugImageFiles, string environmentScene ) : void
OnClientJoin ( ResponseSocket server, JsonData data ) : void
ReadOutMessage ( NetMQMessage msg ) : string
ReceiveSceneSwitch ( ResponseSocket server, JsonData jsonData ) : void
RecieveClientInput ( ResponseSocket server, JsonData jsonData ) : void
SendAndReceiveMongoDB ( JsonData jsonData ) : JsonData
SendFrameUpdate ( CameraStreamer, streamCapture, Avatar a ) : void
SimulateClientInput ( RequestSocket client, JsonData jsonData, NetMQMessage msg ) : void
colorUIDToInt ( Color colorUID ) : int
colorUIDToString ( Color colorUID ) : string

Private Methods

Method Description
CreateNewSocketConnection ( ) : void
CreateTestClient ( ResponseSocket server ) : void
FixedUpdate ( ) : void
OnDisable ( ) : void
ReadOutFrame ( NetMQFrame frame ) : string
Start ( ) : void
Update ( ) : void
sceneWasLoaded ( Scene scene, LoadSceneMode mode ) : void

Method Details

AreAllAvatarsReady() public method

public AreAllAvatarsReady ( ) : bool
return bool

CreateJoinMsgJson() public static method

public static CreateJoinMsgJson ( ) : JsonData
return JsonData

CreateMsgJson() public static method

public static CreateMsgJson ( string msgType ) : JsonData
msgType string
return JsonData

GetAllAvatars() public method

public GetAllAvatars ( ) : List
return List

GetServerForClient() public method

public GetServerForClient ( RequestSocket client ) : ResponseSocket
client RequestSocket
return ResponseSocket

HandleClientFrameMessage() public method

public HandleClientFrameMessage ( RequestSocket client, NetMQMessage msg ) : void
client RequestSocket
msg NetMQMessage
return void

HandleFrameMessage() public method

public HandleFrameMessage ( ResponseSocket server, NetMQMessage msg ) : void
server ResponseSocket
msg NetMQMessage
return void

Init() public method

public Init ( string hostAddress, string portNumber, bool shouldCreateTestClient, bool shouldCreateServer, bool debugNetworkMessages, bool logSimpleTimingInfo, bool logDetailedTimeInfo, string preferredImageFormat, bool saveDebugImageFiles, string environmentScene ) : void
hostAddress string
portNumber string
shouldCreateTestClient bool
shouldCreateServer bool
debugNetworkMessages bool
logSimpleTimingInfo bool
logDetailedTimeInfo bool
preferredImageFormat string
saveDebugImageFiles bool
environmentScene string
return void

Init() public method

public Init ( string hostAddress, string portNumber, string portNumber_info, bool shouldCreateTestClient, bool shouldCreateServer, bool debugNetworkMessages, bool logSimpleTimingInfo, bool logDetailedTimeInfo, string preferredImageFormat, bool saveDebugImageFiles, string environmentScene ) : void
hostAddress string
portNumber string
portNumber_info string
shouldCreateTestClient bool
shouldCreateServer bool
debugNetworkMessages bool
logSimpleTimingInfo bool
logDetailedTimeInfo bool
preferredImageFormat string
saveDebugImageFiles bool
environmentScene string
return void

OnClientJoin() public method

public OnClientJoin ( ResponseSocket server, JsonData data ) : void
server ResponseSocket
data JsonData
return void

ReadOutMessage() public static method

public static ReadOutMessage ( NetMQMessage msg ) : string
msg NetMQMessage
return string

ReceiveSceneSwitch() public method

public ReceiveSceneSwitch ( ResponseSocket server, JsonData jsonData ) : void
server ResponseSocket
jsonData JsonData
return void

RecieveClientInput() public method

public RecieveClientInput ( ResponseSocket server, JsonData jsonData ) : void
server ResponseSocket
jsonData JsonData
return void

SendAndReceiveMongoDB() public method

public SendAndReceiveMongoDB ( JsonData jsonData ) : JsonData
jsonData JsonData
return JsonData

SendFrameUpdate() public method

public SendFrameUpdate ( CameraStreamer, streamCapture, Avatar a ) : void
streamCapture CameraStreamer,
a Avatar
return void

SimulateClientInput() public method

public SimulateClientInput ( RequestSocket client, JsonData jsonData, NetMQMessage msg ) : void
client RequestSocket
jsonData JsonData
msg NetMQMessage
return void

colorUIDToInt() public static method

public static colorUIDToInt ( Color colorUID ) : int
colorUID Color
return int

colorUIDToString() public static method

public static colorUIDToString ( Color colorUID ) : string
colorUID Color
return string

Property Details

avatarPrefab public property

public Avatar avatarPrefab
return Avatar

clientInfo public property

public RequestSocket clientInfo
return RequestSocket

clientSimulation public property

public RequestSocket clientSimulation
return RequestSocket

debugNetworkMessages public property

public bool debugNetworkMessages
return bool

environmentScene public property

public string environmentScene
return string

hostAddress public property

public string hostAddress
return string

logSimpleTimeInfo public static property

public static bool logSimpleTimeInfo
return bool

logTimingInfo public static property

public static bool logTimingInfo
return bool

portNumber public property

public string portNumber
return string

portNumber_info public property

public string portNumber_info
return string

saveDebugImageFiles public property

public bool saveDebugImageFiles
return bool

shouldCreateServer public property

public bool shouldCreateServer
return bool

shouldCreateTestClient public property

public bool shouldCreateTestClient
return bool

usePngFiles public property

public bool usePngFiles
return bool