Exemple #1
0
// Server returns a muxado server session using conn as the transport.
func Server(conn net.Conn) Session {
	return &sessionAdaptor{proto.NewSession(conn, proto.NewStream, false, []proto.Extension{ext.NewDefaultHeartbeat()})}
}
Exemple #2
0
// Client returns a new muxado client-side connection using conn as the transport.
func Client(conn net.Conn) Session {
	return &sessionAdaptor{proto.NewSession(conn, proto.NewStream, true, []proto.Extension{ext.NewDefaultHeartbeat()})}
}