smpp

package module
v0.0.0-...-92d0236 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 9 Imported by: 0

README

go-smpp

A complete implementation of SMPP v5 protocol, written in golang.

Key features

  • Message encoding auto-detection

  • Multipart SMS automatic splitting and concatenating

  • Supported encodings:

    UCS-2     GSM 7bit  ASCII      Latin-1
    Cyrillic  Hebrew    Shift-JIS  ISO-2022-JP
    EUC-JP    EUC-KR
    

Caveats

Command line tools

  1. smpp-receiver

    SMPP Simple Receiver tool

  2. smpp-repl

    SMPP Simple Test tool

LICENSE

This piece of software is released under the MIT license.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConnectionClosed = errors.New("smpp: connection closed")
)

Functions

func ServeTCP

func ServeTCP(address string, handler Handler, config *tls.Config) (err error)

Types

type Handler

type Handler interface{ Serve(*Session) }

type HandlerFunc

type HandlerFunc func(*Session)

func (HandlerFunc) Serve

func (h HandlerFunc) Serve(session *Session)

type Session

type Session struct {
	NextSequence func() int32
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	// contains filtered or unexported fields
}

func NewSession

func NewSession(ctx context.Context, parent net.Conn) (session *Session)

func (*Session) Close

func (c *Session) Close(ctx context.Context) (err error)
func (c *Session) EnquireLink(ctx context.Context, tick time.Duration, timeout time.Duration) (err error)

func (*Session) PDU

func (c *Session) PDU() <-chan any

func (*Session) Send

func (c *Session) Send(packet any) (err error)

func (*Session) Submit

func (c *Session) Submit(ctx context.Context, packet pdu.Responsable) (resp any, err error)

Directories

Path Synopsis
cmd
sms

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL