= FM Network UDP

Description
It’s a Server-Clients networking system for LAN.
It supports string and byte[] streaming.


Basic Setup

All the communication between Server, Clients is via FM Network Manager.
It requires one Server in your whole connection, as it’s Server-Clients based networking system

1. Create a new GameObject in your scene, and name it “FM Network Manager”.
2. Add Component FMNetworkManager.cs

3. Choose Network Type: Server, Client


4. enabled Auto Init is recommended, which will automatically start the connection in runtime.
5. you may also connect them manually as alternative via script.
6. you can force closing connection locally via Action_Close(), or Close Client’s connection via Action_CloseClientConnection().

//Init as Server
FMNetworkManager.instance.Action_InitAsServer();
//Init as Client
FMNetworkManager.instance.Action_InitAsClient();

//Server disconnect Client remotely, with target client's IP for example "192.168.1.123"
FMNetworkManager.instance.Action_CloseClientConnection("192.168.1.123");
//Close FMNetworkManager Connection locally
FMNetworkManager.instance.Action_Close();



Other use case: Data Stream

//Init as Data Stream network type
FMNetworkManager.instance.Action_InitDataStream();
//Init as Data Stream network type, and assign target client which you want to stream to
FMNetworkManager.instance.Action_InitDataStream(string inputClientIP);