I am new to the golang net package. I am wondering what are the differences between net.Pipe() and a classic client and server model.
By using net.Pipe() it returns two connections, and user is allowed to read from one
I am new to the golang net package. I am wondering what are the differences between net.Pipe() and a classic client and server model.
By using net.Pipe() it returns two connections, and user is allowed to read from one and write from the other (or other way around). However, for classic client and server model, user has to create a file called client, sending request to an address, where server file listen to that address and respond.
Hi. net.Pipe https://golang.org/pkg/net/#Pipe must be used internally in a program. See here for some example usages https://zupzup.org/io-pipe-go/. You example of server and client is really two programs talking to each other over a network protocol so net.Pipe would not be used in communication between those two (a least not directly).