Versions in this module Expand all Collapse all v0 v0.1.0 Mar 9, 2018 Changes in this version + const CONN_CLIENT + const CONN_NONE + const DFLT_IO_BUF_SIZE + const DFLT_MAX_RECEIVE_SIZE + const DFLT_RECEIVE_BUFFER_SIZE + const OUTBIND_RECEIVER_THREAD_NAME + const PROC_FINISHED + const PROC_INITIALISING + const PROC_RECEIVING + const RECEIVER_THREAD_NAME + const RECEIVE_CHAN_SIZE + const STATE_ALWAYS + const STATE_CLOSED + const STATE_NOT_ALLOWED + const STATE_OPENED + const STATE_RECEIVER + const STATE_TRANSCEIVER + const STATE_TRANSMITTER + const TYPE_ESME + const TYPE_MC + type Connection struct + func (c *Connection) GetAddress() string + func (c *Connection) GetReceiveTimeout() int64 + func (c *Connection) GetSendTimeout() int64 + func (c *Connection) SetAddress(addr string) + func (c *Connection) SetDefault() + func (c *Connection) SetReceiveTimeout(t int64) + func (c *Connection) SetSendTimeout(t int64) + type IConnection interface + Close func() *Exception.Exception + GetAddress func() string + GetReceiveTimeout func() int64 + GetSendTimeout func() int64 + IsOpened func() bool + Open func() *Exception.Exception + Receive func() (*Utils.ByteBuffer, *Exception.Exception) + Send func(data *Utils.ByteBuffer) *Exception.Exception + SetAddress func(addr string) + SetReceiveTimeout func(t int64) + SetSendTimeout func(t int64) + type IReceiver interface + ReceiveAsync func() + TryReceivePDU func(IConnection, PDU.IPDU) (PDU.IPDU, *Exception.Exception) + type IRoutineProcess interface + GetProcessStatus func() byte + Process func() + type OutbindEvent struct + func NewOutbindEvent(source *OutbindReceiver, con IConnection, pdu *PDU.Outbind) *OutbindEvent + func (c *OutbindEvent) GetOutbindPDU() *PDU.Outbind + func (c *OutbindEvent) GetReceiver() *OutbindReceiver + type OutbindEventListener interface + HandleOutbind func(outbind *OutbindEvent) *Exception.Exception + type OutbindReceiver struct + type ReceivedPDUEvent struct + Connection IConnection + Pdu PDU.IPDU + Source interface{} + func NewReceivedPDUEvent(source *ReceiverBase, con IConnection, pdu PDU.IPDU) *ReceivedPDUEvent + func (c *ReceivedPDUEvent) GetConnection() IConnection + func (c *ReceivedPDUEvent) GetPDU() PDU.IPDU + type Receiver struct + func NewReceiver() *Receiver + func NewReceiverWithConnection(con IConnection) *Receiver + func NewReceiverWithTransmitterCon(trans *Transmitter, con IConnection) *Receiver + func (c *Receiver) ReceiveAsync() + func (c *Receiver) ReceiveSyncWTimeout(timeout int64) (PDU.IPDU, *Exception.Exception) + func (c *Receiver) ReceiveSyncWithExpectedPDU(pdu PDU.IPDU) (PDU.IPDU, *Exception.Exception) + func (c *Receiver) SetServerPDUEventListener(listener ServerPDUEventListener) + func (c *Receiver) Start() + func (c *Receiver) Stop() + func (c *Receiver) StopByException(e *Exception.Exception) + func (c *Receiver) TryReceivePDU(conn IConnection, expected PDU.IPDU) (pduResult PDU.IPDU, expc *Exception.Exception) + type ReceiverBase struct + func NewReceiverBase() *ReceiverBase + func (c *ReceiverBase) Construct() + func (c *ReceiverBase) GetReceiveTimeout() int64 + func (c *ReceiverBase) Process() + func (c *ReceiverBase) ReceivePDUFromConnection(conn IConnection, unprocessed *Utils.Unprocessed) (PDU.IPDU, *Exception.Exception) + func (c *ReceiverBase) RegisterReceiver(rec IReceiver) + func (c *ReceiverBase) SetReceiveTimeout(timeout int64) + type RoutineProcess struct + KeepProcessing bool + ProcessLock sync.RWMutex + ProcessStatus byte + ProcessUnit IRoutineProcess + func (c *RoutineProcess) GetProcessStatus() byte + func (c *RoutineProcess) IsKeepProcessing() bool + func (c *RoutineProcess) RegisterProcessUnit(proc IRoutineProcess) + func (c *RoutineProcess) Run() + func (c *RoutineProcess) StartProcess() + func (c *RoutineProcess) StopProcess() + type ServerPDUEvent struct + func NewServerPDUEvent(source *Receiver, con IConnection, pdu PDU.IPDU) *ServerPDUEvent + func (c *ServerPDUEvent) GetReceiver() *Receiver + type ServerPDUEventListener interface + HandleEvent func(event *ServerPDUEvent) *Exception.Exception + type Session struct + func NewSessionWithConnection(conn IConnection) *Session + func (c *Session) AlertNotification(req *PDU.AlertNotification) (err *Exception.Exception) + func (c *Session) Bind(req PDU.IBindRequest) (PDU.IResponse, *Exception.Exception) + func (c *Session) BindWithListener(req PDU.IBindRequest, pduListener ServerPDUEventListener) (bindResp PDU.IResponse, err *Exception.Exception) + func (c *Session) Cancel(req *PDU.CancelSM) (resp *PDU.CancelSMResp, err *Exception.Exception) + func (c *Session) CheckPDUState(pdu PDU.IPDU) *Exception.Exception + func (c *Session) CheckState(requestedState int32) *Exception.Exception + func (c *Session) Close() *Exception.Exception + func (c *Session) Data(req *PDU.DataSM) (resp *PDU.DataSMResp, err *Exception.Exception) + func (c *Session) Deliver(req *PDU.DeliverSM) (resp *PDU.DeliverSMResp, err *Exception.Exception) + func (c *Session) DisableStateChecking() + func (c *Session) DoEnquireLink() (resp *PDU.EnquireLinkResp, err *Exception.Exception) + func (c *Session) EnableStateChecking() + func (c *Session) EnquireLink(req *PDU.EnquireLink) (resp *PDU.EnquireLinkResp, err *Exception.Exception) + func (c *Session) GenericNack(resp *PDU.GenericNack) *Exception.Exception + func (c *Session) GenericNackWithCmStatusSeqNum(commandStatus, sequenceNumber int32) *Exception.Exception + func (c *Session) GetConnection() IConnection + func (c *Session) GetReceiver() *Receiver + func (c *Session) GetState() int32 + func (c *Session) GetTransmitter() *Transmitter + func (c *Session) GetType() int32 + func (c *Session) IsBound() bool + func (c *Session) IsOpened() bool + func (c *Session) IsPDUAllowed(pdu PDU.IPDU) bool + func (c *Session) IsStateAllowed(requestedState int32) bool + func (c *Session) Open() *Exception.Exception + func (c *Session) Query(req *PDU.QuerySM) (resp *PDU.QuerySMResp, err *Exception.Exception) + func (c *Session) Receive() (pdu PDU.IPDU, err *Exception.Exception) + func (c *Session) ReceiveWTimeout(timeout int64) (pdu PDU.IPDU, err *Exception.Exception) + func (c *Session) Replace(req *PDU.ReplaceSM) (resp *PDU.ReplaceSMResp, err *Exception.Exception) + func (c *Session) Respond(resp PDU.IResponse) (err *Exception.Exception) + func (c *Session) Send(req PDU.IRequest) (resp PDU.IResponse, err *Exception.Exception) + func (c *Session) SendWithAsyncStyle(req PDU.IRequest, isAsync bool) (resp PDU.IResponse, err *Exception.Exception) + func (c *Session) SetType(t int32) + func (c *Session) Submit(req *PDU.SubmitSM) (resp *PDU.SubmitSMResp, err *Exception.Exception) + func (c *Session) SubmitMulti(req *PDU.SubmitMultiSM) (resp *PDU.SubmitMultiSMResp, err *Exception.Exception) + func (c *Session) Unbind() (unbindResp *PDU.UnbindResp, err *Exception.Exception) + type SocketFactory struct + func (c SocketFactory) CreateTCP(address string, port int) (*net.TCPConn, error) + type TCPIPConnection struct + func NewTCPIPConnection() *TCPIPConnection + func NewTCPIPConnectionWithAddrPort(addr string, port int) (*TCPIPConnection, error) + func NewTCPIPConnectionWithSocket(soc *net.TCPConn) (*TCPIPConnection, error) + func (c *TCPIPConnection) Close() *Exception.Exception + func (c *TCPIPConnection) IsOpened() bool + func (c *TCPIPConnection) Open() *Exception.Exception + func (c *TCPIPConnection) Receive() (result *Utils.ByteBuffer, err *Exception.Exception) + func (c *TCPIPConnection) Send(data *Utils.ByteBuffer) (err *Exception.Exception) + func (c *TCPIPConnection) SetIOBufferSize(size int) + func (c *TCPIPConnection) SetMaxReceiveSize(size int) + func (c *TCPIPConnection) SetReceiveBufferSize(size int) + type Transmitter struct + func NewTransmitter() *Transmitter + func NewTransmitterWithConnection(con IConnection) *Transmitter + func (c *Transmitter) Send(pdu PDU.IPDU) *Exception.Exception + type UnbindServerPDUEventListener struct + func NewUnbindServerPDUEventListener(sess *Session, origListener ServerPDUEventListener, unbindReq *PDU.Unbind) *UnbindServerPDUEventListener + func (c *UnbindServerPDUEventListener) CloseWaitChan() + func (c *UnbindServerPDUEventListener) GetUnbindResp() *PDU.UnbindResp + func (c *UnbindServerPDUEventListener) GetWaitChan() chan bool + func (c *UnbindServerPDUEventListener) HandleEvent(event *ServerPDUEvent) *Exception.Exception + func (c *UnbindServerPDUEventListener) StartWait(miliSecond int64)