aboutsummaryrefslogtreecommitdiff
path: root/misc/main.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-09-29 10:10:56 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-09-29 10:10:56 +0200
commit6e2b275eae608db58e2f8d022917f71464de1eba (patch)
tree3a45d40bd953dc7b0ecbaea6deb1b92b294faf6c /misc/main.go
parente867d90e8e78a3b3e92debe2583e5583a2d8769a (diff)
Rename tde into spdu
Diffstat (limited to 'misc/main.go')
-rw-r--r--misc/main.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/misc/main.go b/misc/main.go
index a6500fb..1cfb3d8 100644
--- a/misc/main.go
+++ b/misc/main.go
@@ -6,7 +6,7 @@ import (
"fmt"
"log"
- "dim13.org/asn1/tde"
+ "dim13.org/asn1/spdu"
)
/* Limits
@@ -25,7 +25,7 @@ import (
*/
var service = flag.String("service", "192.168.240.20:33333", "PBX CTI Service")
-var conn tde.Conn
+var conn spdu.Conn
func init() {
flag.Parse()
@@ -209,19 +209,19 @@ func dump(b []byte) {
fmt.Println(hex.Dump(b))
}
-func Ask(c tde.Conn, out []byte) []byte {
+func Ask(c spdu.Conn, out []byte) []byte {
log.Println("Ask")
dump(out)
c.Write(out)
- in, _ := tde.ReadAll(c)
+ in, _ := spdu.ReadAll(c)
log.Printf("Packet length: 0x%.2X\n", len(in))
dump(in)
return in
}
-func Status(c tde.Conn) {
+func Status(c spdu.Conn) {
log.Println("Status")
- in, _ := tde.ReadAll(c)
+ in, _ := spdu.ReadAll(c)
log.Printf("Packet length: 0x%.2X\n", len(in))
dump(in)
out := status
@@ -231,7 +231,7 @@ func Status(c tde.Conn) {
}
func main() {
- conn, _ = tde.Dial(*service)
+ conn, _ = spdu.Dial(*service)
defer conn.Close()
Ask(conn, associate)