Open MostHated opened 6 years ago
Seems like this is not related to this project, but I can answer your question
About your question, yes it can have multiple listeners on server side more than one port and also different protocol
About this project, it's wrapper for ENet which is RUDP, I made this project to use ENet on Unity
Yes, sorry, after researching more I realized what I was after was not exactly TCP / UDP but Reliable UDP and the ability to send the different message reliabilities on the fly. I have been trying out all of the different networking systems for Unity to see which one best fits my needs. Yours looks like it is next on my list to try. 👍
Please forgive me but do you happen to have any additional use case demos or anything to look over? I know it was probably the intention but the demo is quite basic.
As I mentioned I am using MessagePack to serialize my data which ends up essentially looking something like the below which currently I was testing LiteNetLib but am very interested in looking into ENet because of the performance benefit it has once you start reaching a lot of connections as my game is a persistent world online RPG.
var msg= SerializeInternal(data);
recycleWriter.Put(msg);
SendMessageByChannelToTargetConnection(recycleWriter, DeliveryMethod.ReliableOrdered, connToHost);
public byte[] SerializeInternal(SomeData temp)
{
var msg = new Temporary { tempPeer = temp };
Debug.Log(msg.ToString());
var serializedmsg = LZ4MessagePackSerializer.Serialize(msg);
return serializedmsg;
}
I am wanting to figure out how I would end up doing similar with your framework but am a bit throw off by the Initialize, SetUserData, and Freed. Do you happen to have any more info on those and what not?
Thanks!
For now, it's just a wrapper to use ENET functions, I might develop it for more easily usage like I did with https://github.com/insthync/LiteNetLibManager
Understood. I am guessing that when using something like your LiteNet manager, even within Unity as opposed to a standalone console server, there is still a ton more extra work that has to be done to get it working properly, such as being able to handle basic Unity functionality like spawning, syncing movement, handling physics, etc?
I decided to try MLAPI for Unity because it seems to have a lot of the necessary features but it is so new that it is still not without its own list of issues.
Hello there, I was wondering if a client is able to connect via both TCP and UDP at the same time allowing you to determine which message types you would like to send over each connection? Also, is it possible to have multiple listeners setup on the server side for more than one port? I wanted the interconnecting servers to connect to one port and clients to connect on another and the messages get handled differently based on what port the connection came in on. The messages I need to be able to send could / would essentially just be a serialized byte[] array from MessagePack. containing dictionary<byte, object>, and an enum byte.
Thanks!