Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an embedded STUN Binding server that responds to RFC 5389 Binding Requests with the client's reflexive transport address.
func (*Server) LocalAddr ¶
LocalAddr returns the server's bound address, or nil if not yet listening.
func (*Server) Run ¶
func (s *Server) Run()
Run starts the STUN server. It blocks until Stop is called.
func (*Server) Stop ¶
func (s *Server) Stop()
Stop signals the server to shut down. If the server has already bound its socket, Stop closes it and waits for the read loop to exit. If Stop races with Run (socket not yet bound), it sets a flag that Run checks after binding. Safe to call even if Run was never called.
Click to show internal directories.
Click to hide internal directories.