summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.go b/main.go
index d66d6a9..ae254ca 100644
--- a/main.go
+++ b/main.go
@@ -121,9 +121,11 @@ func handleConnection(clientConn net.Conn, where string, localport int) {
// make a new event from this new connection
log.Printf("Connected on port %d from client: %s to where = %s\n", localport, clientConn.RemoteAddr(), where)
e := new(Event)
- e.Address = fmt.Sprintf("%s\n", clientConn.RemoteAddr())
- e.Where = where
+ e.Etype = GusEventType_Connect
e.LocalPort = int64(localport)
+ e.Sock = new(GusSocket)
+ e.Sock.SrcIp = fmt.Sprintf("%s", clientConn.RemoteAddr())
+ e.Sock.DestIp = where
e.Ctime = timestamppb.New(time.Now())
me.events.Append(e)
me.eventsChanged = true