-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlistener.go
More file actions
24 lines (18 loc) · 759 Bytes
/
Copy pathlistener.go
File metadata and controls
24 lines (18 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright (c) 2019 Meng Huang (mhboy@outlook.com)
// This package is licensed under a MIT license that can be found in the LICENSE file.
package rpc
import (
"crypto/tls"
)
// Listen announces on the local network address.
func Listen(network, address string, codec string) error {
return DefaultServer.Listen(network, address, codec)
}
// ListenTLS announces on the local network address with tls.Config.
func ListenTLS(network, address string, codec string, config *tls.Config) error {
return DefaultServer.ListenTLS(network, address, codec, config)
}
// ListenWithOptions announces on the local network address with Options.
func ListenWithOptions(address string, opts *Options) error {
return DefaultServer.ListenWithOptions(address, opts)
}