What are the options for network programming in Go?

I want to write a simple client / server using TCP sockets. Any ideas on how to do network programming in Go?

+3
source share
1 answer

Go has great support for networking.

For the server, the easiest way to do this is to main()start the tcp adoption cycle and spawn goroutine to handle each request.

The first software I wrote was a memcached server. You might want to check out gomemcached for an idea on how to get started on servers.

. goroutines , gomemcached .

, . , - , .

+5

Source: https://habr.com/ru/post/1725418/


All Articles