grizzly v0.8.7 Grizzly.Conn.Config View Source

A data structure to configure the connection between the library and the Z/IP server.

Each connection will take on of these to know how to get connected and which client to use to do connecting and response handling.

By default, if there is no client given, this will enfore the Grizzly.Client.DTLS is used.

Link to this section Summary

Types

t()

The configuration is defined as follows

Link to this section Types

Link to this type

mode() View Source
mode() :: :sync | :async

Link to this type

t() View Source
t() :: %Grizzly.Conn.Config{
  autoconnect: boolean(),
  client: module(),
  heart_beat_timer: non_neg_integer(),
  ip: :inet.ip_address(),
  mode: mode(),
  port: :inet.port_number()
}

The configuration is defined as follows:

  • :port - the server port.
  • :ip - the server IP address.
  • :client - the client that will handle connecting and message processing.
  • :heart_beat_timer - the interval (in milliseconds) between heart beats. This SHOULD be between 25-55 seconds.
  • :autoconnect - whether or not the connection should automatically attempt to connect on application start.
  • :mode - can be :sync or :async. If :sync is set then this will block the caller. If :async is set then messages with the connection will be pushed to the calling process.

Link to this section Functions