github.com/ronaksoft/rony@v0.16.26-0.20230807065236-1743dbfe6959/edge/export_test.go (about) 1 package edge 2 3 import ( 4 "github.com/ronaksoft/rony" 5 tcpGateway "github.com/ronaksoft/rony/internal/gateway/tcp" 6 ) 7 8 /* 9 Creation Time: 2020 - Nov - 09 10 Created by: (ehsan) 11 Maintainers: 12 1. Ehsan N. Moosa (E2) 13 Auditor: Ehsan N. Moosa (E2) 14 Copyright Ronak Software Group 2020 15 */ 16 17 // OnGatewayMessage is exposed only for test packages 18 func (edge *Server) OnGatewayMessage(conn rony.Conn, streamID int64, data []byte) { 19 edge.onGatewayMessage(conn, streamID, data) 20 } 21 22 // GatewayConns is exposed only for test packages 23 func (edge *Server) GatewayConns() int { 24 g, _ := edge.gateway.(*tcpGateway.Gateway) 25 if g == nil { 26 return 0 27 } 28 29 return g.TotalConnections() 30 }