From ebffb995c6581724b0b6760bf0c68f0f9d0c4160 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Thu, 12 Dec 2024 06:44:47 +0800 Subject: Use uint32 for SIDs, uint64 for CIDs --- servers.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'servers.go') diff --git a/servers.go b/servers.go index f9dd319..59ed979 100644 --- a/servers.go +++ b/servers.go @@ -7,7 +7,7 @@ import ( type Server struct { conn *net.Conn - SID string + SID uint32 Name string } @@ -38,8 +38,8 @@ func (server *Server) ClientSource() string { return server.Name } -func (server *Server) ServerSource() string { - return server.SID +func (server *Server) ServerSource() uint64 { + return uint64(server.SID) << 32 } var self *Server -- cgit v1.2.3