當前位置: 首頁>>代碼示例>>Golang>>正文


Golang mangos.StripScheme函數代碼示例

本文整理匯總了Golang中github.com/gdamore/mangos.StripScheme函數的典型用法代碼示例。如果您正苦於以下問題:Golang StripScheme函數的具體用法?Golang StripScheme怎麽用?Golang StripScheme使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了StripScheme函數的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: NewListener

func (t *inprocTran) NewListener(addr string, sock mangos.Socket) (mangos.PipeListener, error) {
	if _, err := mangos.StripScheme(t, addr); err != nil {
		return nil, err
	}
	l := &listener{addr: addr, proto: sock.GetProtocol()}
	return l, nil
}
開發者ID:BobbWu,項目名稱:mangos,代碼行數:7,代碼來源:inproc.go

示例2: NewListener

func (t *inprocTran) NewListener(addr string, proto mangos.Protocol) (mangos.PipeListener, error) {
	if _, err := mangos.StripScheme(t, addr); err != nil {
		return nil, err
	}
	l := &listener{addr: addr, proto: proto}
	return l, nil
}
開發者ID:rlhatcher,項目名稱:mangos,代碼行數:7,代碼來源:inproc.go

示例3: NewListener

// NewAccepter implements the Transport NewAccepter method.
func (t *tlsTran) NewListener(addr string, proto mangos.Protocol) (mangos.PipeListener, error) {
	var err error
	l := &listener{proto: proto, opts: newOptions(t)}

	if addr, err = mangos.StripScheme(t, addr); err != nil {
		return nil, err
	}
	if l.addr, err = net.ResolveTCPAddr("tcp", addr); err != nil {
		return nil, err
	}

	return l, nil
}
開發者ID:iwarsong,項目名稱:bearded,代碼行數:14,代碼來源:tlstcp.go

示例4: NewDialer

func (t *tlsTran) NewDialer(addr string, proto mangos.Protocol) (mangos.PipeDialer, error) {
	var err error

	if addr, err = mangos.StripScheme(t, addr); err != nil {
		return nil, err
	}

	d := &dialer{proto: proto, opts: newOptions(t)}
	if d.addr, err = net.ResolveTCPAddr("tcp", addr); err != nil {
		return nil, err
	}
	return d, nil
}
開發者ID:iwarsong,項目名稱:bearded,代碼行數:13,代碼來源:tlstcp.go

示例5: NewDialer

// NewDialer implements the Transport NewDialer method.
func (t *ipcTran) NewDialer(addr string, sock mangos.Socket) (mangos.PipeDialer, error) {
	var err error

	if addr, err = mangos.StripScheme(t, addr); err != nil {
		return nil, err
	}

	d := &dialer{sock: sock, opts: nil}
	if d.addr, err = net.ResolveUnixAddr("unix", addr); err != nil {
		return nil, err
	}
	return d, nil
}
開發者ID:lucmichalski,項目名稱:mangos,代碼行數:14,代碼來源:ipc.go

示例6: NewDialer

// NewDialer implements the Transport NewDialer method.
func (t *ipcTran) NewDialer(addr string, proto mangos.Protocol) (mangos.PipeDialer, error) {
	var err error

	if addr, err = mangos.StripScheme(t, addr); err != nil {
		return nil, err
	}

	d := &dialer{proto: proto, opts: nil}
	if d.addr, err = net.ResolveUnixAddr("unix", addr); err != nil {
		return nil, err
	}
	return d, nil
}
開發者ID:iwarsong,項目名稱:bearded,代碼行數:14,代碼來源:ipc.go

示例7: NewDialer

func (t *tcpTran) NewDialer(addr string, sock mangos.Socket) (mangos.PipeDialer, error) {
	var err error
	d := &dialer{sock: sock, opts: newOptions()}

	if addr, err = mangos.StripScheme(t, addr); err != nil {
		return nil, err
	}

	if d.addr, err = net.ResolveTCPAddr("tcp", addr); err != nil {
		return nil, err
	}
	return d, nil
}
開發者ID:lucmichalski,項目名稱:mangos,代碼行數:13,代碼來源:tcp.go

示例8: NewListener

// NewListener implements the Transport NewListener method.
func (t *ipcTran) NewListener(addr string, sock mangos.Socket) (mangos.PipeListener, error) {
	var err error
	l := &listener{sock: sock}

	if addr, err = mangos.StripScheme(t, addr); err != nil {
		return nil, err
	}

	if l.addr, err = net.ResolveUnixAddr("unix", addr); err != nil {
		return nil, err
	}

	return l, nil
}
開發者ID:lucmichalski,項目名稱:mangos,代碼行數:15,代碼來源:ipc.go

示例9: NewListener

// NewListener implements the Transport NewListener method.
func (t *ipcTran) NewListener(addr string, proto mangos.Protocol) (mangos.PipeListener, error) {
	var err error
	l := &listener{proto: proto}

	if addr, err = mangos.StripScheme(t, addr); err != nil {
		return nil, err
	}

	if l.addr, err = net.ResolveUnixAddr("unix", addr); err != nil {
		return nil, err
	}

	return l, nil
}
開發者ID:iwarsong,項目名稱:bearded,代碼行數:15,代碼來源:ipc.go

示例10: NewListener

func (t *tcpTran) NewListener(addr string, sock mangos.Socket) (mangos.PipeListener, error) {
	var err error
	l := &listener{sock: sock, opts: newOptions()}

	if addr, err = mangos.StripScheme(t, addr); err != nil {
		return nil, err
	}

	if l.addr, err = net.ResolveTCPAddr("tcp", addr); err != nil {
		return nil, err
	}

	return l, nil
}
開發者ID:lucmichalski,項目名稱:mangos,代碼行數:14,代碼來源:tcp.go

示例11: NewDialer

func (t *inprocTran) NewDialer(addr string, sock mangos.Socket) (mangos.PipeDialer, error) {
	if _, err := mangos.StripScheme(t, addr); err != nil {
		return nil, err
	}
	return &dialer{addr: addr, proto: sock.GetProtocol()}, nil
}
開發者ID:BobbWu,項目名稱:mangos,代碼行數:6,代碼來源:inproc.go

示例12: NewDialer

func (t *inprocTran) NewDialer(addr string, proto mangos.Protocol) (mangos.PipeDialer, error) {
	if _, err := mangos.StripScheme(t, addr); err != nil {
		return nil, err
	}
	return &dialer{addr: addr, proto: proto}, nil
}
開發者ID:rlhatcher,項目名稱:mangos,代碼行數:6,代碼來源:inproc.go


注:本文中的github.com/gdamore/mangos.StripScheme函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。