Documentation
¶
Index ¶
- Variables
- func Dial(network, address string) (c net.Conn, err error)
- func Listen(network, address string) (net.Listener, error)
- type Dialer
- type UDTAddr
- type UDTConn
- func (fd UDTConn) Close() error
- func (fd UDTConn) LocalAddr() net.Addr
- func (fd UDTConn) Read(buf []byte) (readcnt int, err error)
- func (fd UDTConn) RemoteAddr() net.Addr
- func (fd UDTConn) SetDeadline(t time.Time) error
- func (fd UDTConn) SetReadDeadline(t time.Time) error
- func (fd UDTConn) SetWriteDeadline(t time.Time) error
- func (fd UDTConn) Write(buf []byte) (writecnt int, err error)
- type UDTListener
Constants ¶
This section is empty.
Variables ¶
var ( // UDP_RCVBUF_SIZE is the default UDP_RCVBUF size. UDP_RCVBUF_SIZE = uint32(20971520) // 20MB // UDT_SNDTIMEO is the udt_send() timeout in milliseconds // note this doesnt change the interface, we use it as a poor polling UDT_SNDTIMEO_MS = C.int(UDT_ASYNC_TIMEOUT) // UDT_RCVTIMEO is the udt_recv() timeout in milliseconds // note this doesnt change the interface, we use it as a poor polling UDT_RCVTIMEO_MS = C.int(UDT_ASYNC_TIMEOUT) // UDT_ASYNC_TIMEOUT (in ms) UDT_ASYNC_TIMEOUT = 40 )
Functions ¶
func Dial ¶
Dial connects to the remote address raddr on the network net, which must be "udt", "udt4", or "udt6". If laddr is not nil, it is used as the local address for the connection.
func Listen ¶
Listen listens for incoming UDT packets addressed to the local address laddr. Net must be "udt", "udt4", or "udt6". If laddr has a port of 0, ListenUDT will choose an available port. The LocalAddr method of the returned UDTConn can be used to discover the port. The returned connection's ReadFrom and WriteTo methods can be used to receive and send UDT packets with per-packet addressing.
Types ¶
type Dialer ¶
type UDTAddr ¶
type UDTAddr struct {
// contains filtered or unexported fields
}
func ResolveUDTAddr ¶
func WrapUDPAddr ¶
type UDTConn ¶
type UDTConn struct {
// contains filtered or unexported fields
}
UDTConn is the implementation of the Conn and PacketConn interfaces for UDT network connections.
func DialUDT ¶
DialUDT connects to the remote address raddr on the network net, which must be "udt", "udt4", or "udt6". If laddr is not nil, it is used as the local address for the connection.
func (UDTConn) RemoteAddr ¶
func (UDTConn) SetDeadline ¶
func (UDTConn) SetReadDeadline ¶
func (UDTConn) SetWriteDeadline ¶
type UDTListener ¶
UDTListener is a network listener for UDT.
func ListenUDT ¶
func ListenUDT(network string, laddr *UDTAddr) (*UDTListener, error)
ListenUDT listens for incoming UDT packets addressed to the local address laddr. Net must be "udt", "udt4", or "udt6". If laddr has a port of 0, ListenUDT will choose an available port. The LocalAddr method of the returned UDTConn can be used to discover the port. The returned connection's ReadFrom and WriteTo methods can be used to receive and send UDT packets with per-packet addressing.
func (*UDTListener) Addr ¶
func (l *UDTListener) Addr() net.Addr
func (*UDTListener) Close ¶
func (l *UDTListener) Close() error
Directories
¶
Path | Synopsis |
---|---|
Godeps
|
|
_workspace/src/github.com/jbenet/go-ctxgroup
package ctxgroup provides the ContextGroup, a hybrid between the context.Context and sync.WaitGroup, which models process trees.
|
package ctxgroup provides the ContextGroup, a hybrid between the context.Context and sync.WaitGroup, which models process trees. |
_workspace/src/github.com/jbenet/go-sockaddr/net
package sockaddrnet provides conversions between net.Addr and syscall.Sockaddr
|
package sockaddrnet provides conversions between net.Addr and syscall.Sockaddr |
_workspace/src/golang.org/x/net/context
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
|
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes. |
package udtcat provides an implementation of netcat using the go-udtwrapper package.
|
package udtcat provides an implementation of netcat using the go-udtwrapper package. |