Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckError ¶
func CheckError(err error)
CheckError is a helper function for panicing on errors which we need to handle but should be very rare e.g. failures deserializing a protobuf object that should only happen if there was a bug in the underlying library.
func GetTorHostname ¶
GetTorHostname takes a []byte contained a DER-encoded RSA public key and returns the first 16 bytes of the base32 encoded sha1 hash of the key. This is the onion hostname of the tor service represented by the public key.
func RecoverFromError ¶
func RecoverFromError()
RecoverFromError doesn't really recover from anything....see comment below
Types ¶
type NetworkResolver ¶
type NetworkResolver struct {
}
NetworkResolver allows a client to resolve various hostnames to connections The supported types are onions address are:
- ricochet:jlq67qzo6s4yp3sp
- jlq67qzo6s4yp3sp
- 127.0.0.1:55555|jlq67qzo6s4yp3sp - Localhost Connection
type RicochetData ¶
RicochetData is a structure containing the raw data and the channel it the message originated on.
func (RicochetData) Equals ¶
func (rd RicochetData) Equals(other RicochetData) bool
Equals compares a RicochetData object to another and returns true if contain the same data.
type RicochetNetwork ¶
type RicochetNetwork struct {
}
RicochetNetwork is a concrete implementation of the RicochetNetworkInterface
func (*RicochetNetwork) RecvRicochetPacket ¶
func (rn *RicochetNetwork) RecvRicochetPacket(reader io.Reader) (RicochetData, error)
RecvRicochetPacket returns the next packet from reader as a RicochetData structure, or an error.
func (*RicochetNetwork) SendRicochetPacket ¶
SendRicochetPacket places the data into a structure needed for the client to decode the packet and writes the packet to the network.