Reputation: 443
I need to write a client and a server. Client can send different request types as a GoLang struct, and server should recognize the type, and invoke a corresponding handler function. How would you achieve that? I tried to look into gob package, but I don`t see that it can recognize the type it receives from the stream?
One more quest - is gob package the most efficient way to pass messages between client, and server from the low-latency low-memory utilization perspective?
Upvotes: 2
Views: 304