Documentation
¶
Overview ¶
Package ucp provides a UCP client.
References:
http://documents.swisscom.com/product/1000174-Internet/Documents/Landingpage-Mobile-Mehrwertdienste/UCP_R4.7.pdf https://wiki.wireshark.org/UCP https://www.wireshark.org/docs/dfref/u/ucp.html
Index ¶
- func DefaultHandler(sender, receiver, messageID, message, accessCode string)
- type Client
- func (c *Client) Close()
- func (c *Client) Connect() error
- func (c *Client) DeliveryHandler(handler Handler)
- func (c *Client) GetBillingID() string
- func (c *Client) GetTps() int
- func (c *Client) Printf(format string, v ...interface{})
- func (c *Client) Send(sender, receiver, message string) ([]string, error)
- func (c *Client) SetBillingID(id string)
- func (c *Client) SetTps(tps int)
- func (c *Client) ShortMessageHandler(handler Handler)
- type Handler
- type Logger
- type Options
- type UcpError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultHandler ¶
func DefaultHandler(sender, receiver, messageID, message, accessCode string)
DefaultHandler is called if DeliveryHandler or ShortMessageHandler is not set. It just logs the parameters.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a UCP client connection.
func (*Client) DeliveryHandler ¶
DeliveryHandler sets the delivery notification handler.
func (*Client) GetBillingID ¶
GetBillingID returns the current billing identifier.
func (*Client) Send ¶
Send will send the message to the receiver with a sender mask. It returns a list of message IDs from the SMSC.
func (*Client) SetBillingID ¶
SetBillingID sets the billing identifier to be used by the client.
func (*Client) ShortMessageHandler ¶
ShortMessageHandler sets the delivery short message handler.
type Options ¶
type Options struct {
// Addr represents the ip:port address of the SMSC.
Addr string
// User represents the SMSC user.
User string
// Password represents the SMSC password.
Password string
// AccessCode represents the SMSC access code.
AccessCode string
// Tps mobile-terminating transactions per second.
Tps int
// Logger implements the Logger interface
Logger Logger
// Timeout is the specified network timeout for waiting submit short message responses
Timeout time.Duration
// KeepAlive is the ping interval for sending keep-alive packets to the SMSC
KeepAlive time.Duration
// DeliveryHandler sets the delivery notification handler(delivery receipts).
DeliveryHandler Handler
// ShortMessageHandler sets the delivery short message handler(mobile originating messages).
ShortMessageHandler Handler
}
Options is used to configure the instantiation of a Client.
Click to show internal directories.
Click to hide internal directories.