Skip to content

Commit

Permalink
remove handlePdu in new example
Browse files Browse the repository at this point in the history
  • Loading branch information
laduchesneau committed Feb 3, 2024
1 parent 0a73c3e commit e0dbb09
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions example/transeiver_with_window_size_and_expected_response/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,41 +128,6 @@ func handleExpectedPdu() func(response pdu.Response) {
}
}

func handlePDU() func(pdu.PDU) (pdu.PDU, bool) {
return func(p pdu.PDU) (pdu.PDU, bool) {
switch pd := p.(type) {
case *pdu.Unbind:
fmt.Println("Unbind Received")
return pd.GetResponse(), true

case *pdu.UnbindResp:
fmt.Println("UnbindResp Received")

case *pdu.SubmitSMResp:
fmt.Println("SubmitSMResp Received")

case *pdu.GenericNack:
fmt.Println("GenericNack Received")

case *pdu.EnquireLinkResp:
fmt.Println("EnquireLinkResp Received")

case *pdu.EnquireLink:
fmt.Println("EnquireLink Received")
return pd.GetResponse(), false

case *pdu.DataSM:
fmt.Println("DataSM receiver")
return pd.GetResponse(), false

case *pdu.DeliverSM:
fmt.Println("DeliverSM receiver")
return pd.GetResponse(), false
}
return nil, false
}
}

func newSubmitSM() *pdu.SubmitSM {
// build up submitSM
srcAddr := pdu.NewAddress()
Expand Down

0 comments on commit e0dbb09

Please sign in to comment.