event handlers

This commit is contained in:
Radu Ioan Fericean
2012-05-03 23:14:23 +03:00
parent 216f5cf92b
commit f5eedc4498
5 changed files with 89 additions and 38 deletions

View File

@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
package sessionmanager
import (
"log"
//"log"
"testing"
)
@@ -28,7 +28,9 @@ func TestConnect(t *testing.T) {
sm.Connect("localhost:8021", "ClueCon")
for {
ev := sm.ReadNextEvent()
log.Printf("%s : %s", ev.Fields["Event-Name"], ev.Fields["Event-Subclass"])
log.Print(ev)
if ev == nil {
t.Error("Got nil event!")
}
//log.Print(ev)
}
}