func (wc *WebsocketClientBuilder) Build() transport.ClientTransporter {
	return func(ctx context.Context) (*transport.Transport, error) {
		return transport.NewWebsocketClientTransport(ctx, wc.url, wc.tlsCfg, wc.header, wc.proxy)
	}
}
Build builds and returns a new websocket ClientTransporter
package rsocket
import (
	"context"
	"crypto/tls"
	"fmt"
	"net/http"
	"net/url"
	"os"
	"github.com/gorilla/websocket"
	"github.com/rsocket/rsocket-go/core/transport"
)
const (
	DefaultUnixSockPath = "/var/run/rsocket.sock"
	DefaultPort = 7878
)
type TCPClientBuilder struct {
	addr   string
	tlsCfg *tls.Config
}
type TCPServerBuilder struct {
	addr   string
	tlsCfg *tls.Config
}
type WebsocketClientBuilder struct {
	url    string
	tlsCfg *tls.Config
	header http.Header
	proxy  func(*http.Request) (*url.URL, error)
}
type WebsocketServerBuilder struct {
	addr      string
	path      string
	tlsConfig *tls.Config
	upgrader  *websocket.Upgrader
}
type UnixClientBuilder struct {
	path string
}
type UnixServerBuilder struct {
	path string
}
func (us *UnixServerBuilder) SetPath(path string) *UnixServerBuilder {
	us.path = path
	return us
}
func (us *UnixServerBuilder) Build() transport.ServerTransporter {
	return func(ctx context.Context) (transport.ServerTransport, error) {
		if _, err := os.Stat(us.path); !os.IsNotExist(err) {
			return nil, err
		}
		return transport.NewTCPServerTransportWithAddr("unix", us.path, nil), nil
	}
}
func (uc *UnixClientBuilder) SetPath(path string) *UnixClientBuilder {
	uc.path = path
	return uc
}
func (uc UnixClientBuilder) Build() transport.ClientTransporter {
	return func(ctx context.Context) (*transport.Transport, error) {
		return transport.NewTCPClientTransportWithAddr(ctx, "unix", uc.path, nil)
	}
}
func (ws *WebsocketServerBuilder) SetAddr(addr string) *WebsocketServerBuilder {
	ws.addr = addr
	return ws
}
func (ws *WebsocketServerBuilder) SetPath(path string) *WebsocketServerBuilder {
	ws.path = path
	return ws
}
func (ws *WebsocketServerBuilder) SetTLSConfig(c *tls.Config) *WebsocketServerBuilder {
	ws.tlsConfig = c
	return ws
}
func (ws *WebsocketServerBuilder) SetUpgrader(upgrader *websocket.Upgrader) *WebsocketServerBuilder {
	ws.upgrader = upgrader
	return ws
}
func (ws *WebsocketServerBuilder) Build() transport.ServerTransporter {
	return func(ctx context.Context) (transport.ServerTransport, error) {
		return transport.NewWebsocketServerTransportWithAddr(ws.addr, ws.path, ws.upgrader, ws.tlsConfig), nil
	}
}
func (wc *WebsocketClientBuilder) SetTLSConfig(c *tls.Config) *WebsocketClientBuilder {
	wc.tlsCfg = c
	return wc
}
func (wc *WebsocketClientBuilder) SetURL(url string) *WebsocketClientBuilder {
	wc.url = url
	return wc
}
func (wc *WebsocketClientBuilder) SetHeader(header http.Header) *WebsocketClientBuilder {
	wc.header = header
	return wc
}
func (wc *WebsocketClientBuilder) SetProxy(proxy func(*http.Request) (*url.URL, error)) *WebsocketClientBuilder {
	wc.proxy = proxy
	return wc
}