Hello,
Trying to send a large byte array from Client to Server and was immediately told it was too large and that the channel (I was using channel 0) does not support message segmentation. So I was looking into adding a new channel of type "Reliable Fragmented".
So, I started by simply adding a channel to the default config like this:
int Channel;
NetworkClient NetClient = new NetworkClient ();
Channel = NetworkClient.hostTopology.DefaultConfig.AddChannel (QosType.ReliableFragmented);
NetClient.SendByChannel (100, NetMsg, Channel);
When I attempted to Send like this I received the following errors:
channelid < connection -> config -> MaxChannels ();
Invalid channelID (2) for connection (1)
At that point I figured maybe it is not working because I am setting this channel up after connecting? So I did this:
int Channel;
NetworkClient NetClient = new NetworkClient ();
ConnectionConfig Config = new ConnectionConfig ()
Config.addChannel (QosType.Reliable);
Config.addChannel (QosType.Unreliable);
Channel = Config.AddChannel (Qos.RelaibleFragmented);
HostTopology Toplogy = new HostTopology (Config, 10000);
NetClient.Configure (Topology);
NetClient.Connect (serverIP, serverPort);
NetClient.SendByChannel (100, NetMsg, Channel);
Error:
CRCmismatch
Any advice? What are the best practices steps in order to set up a custom channel that allows for message fragmentation?
Thanks,
Sean
↧