Use tunnel transport and set server address

This commit is contained in:
Asim Aslam 2019-08-27 13:21:36 +01:00
parent 371b23d055
commit 87b56d46ac

View File

@ -60,12 +60,13 @@ func newNetwork(opts ...Option) Network {
) )
// create tunnel client with tunnel transport // create tunnel client with tunnel transport
tunTransport := transport.NewTransport( tunTransport := trn.NewTransport(
trn.WithTunnel(options.Tunnel), trn.WithTunnel(options.Tunnel),
) )
// srv is network server // srv is network server
srv := server.NewServer( srv := server.NewServer(
server.Address(options.Address),
server.Name(options.Name), server.Name(options.Name),
server.Transport(tunTransport), server.Transport(tunTransport),
) )