Send Data

Description
FMNetworkManager is required, when you are executing below commands.

Example functions of sending string message

string Message = "Hello World";

//send the message to everyone including sender
FMNetworkManager.instance.SendToAll(Message);

//send the message to others
FMNetworkManager.instance.SendToOthers(Message);

//send the message to Server
FMNetworkManager.instance.SendToServer(Message);

//send the message to target IP address
FMNetworkManager.instance.SendToTarget(Message, "127,0,0,1");

Example functions of sending byte array

byte[] ByteData = new byte[1234];

//send the message to everyone including sender
FMNetworkManager.instance.SendToAll(ByteData);

//send the message to others
FMNetworkManager.instance.SendToOthers(ByteData);

//send the message to Server
FMNetworkManager.instance.SendToServer(ByteData);

//send the message to target IP address
FMNetworkManager.instance.SendToTarget(ByteData, "127,0,0,1");

//[require network type: Data Stream(Sender)]
//Stream Data to default assigned client IP, as raw UDP data stream
FMNetworkManager.instance.StreamData(byte[] _byteData)