D
D
DarkByte20152017-07-16 16:19:35
Java
DarkByte2015, 2017-07-16 16:19:35

Organization of network interaction at a primitive level?

Please tell me how to add abstractions to network interaction? For example, I'm writing some network game or chat. Communication over TCP / UDP or something else (but not HTML of course, web sockets will not work either). How can I organize a normal data exchange protocol and, importantly, hang some kind of abstraction so as not to manually read, for example, some Enum element from the data stream and make a switch on it - this is not comme il faut. If there are many different actions, you get tired of adding enum items and conditions ... I would like, as in web frameworks, to hang routes and have the desired method called itself when data arrives. I don’t know, maybe there are some libraries ready for this, or is it necessary to fence reflection? How are things like this done in real games? Well, it's like Counter, Dota or something else... (Of course, I'm not planning anything that big, but still) An example in any language will do. For example C# or Java or something else... (but not Brainfuck pzhl :D)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LiptonOlolo, 2017-07-20
@LiptonOlolo

Write to me on VK: vk.com/tcp__ip
I have a library for TCP and UDP sockets. In TCP implemented, like, everything you need.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question