新增聊天功能
This commit is contained in:
@@ -42,6 +42,15 @@ func (s *zeroconfService) FindService() ([]models.Online, error) {
|
||||
return s.onlines, nil
|
||||
}
|
||||
|
||||
func (s *zeroconfService) GetOnline(id string) *models.Online {
|
||||
for _, online := range s.onlines {
|
||||
if online.ID == id {
|
||||
return &online
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *zeroconfService) StartFindService() error {
|
||||
resolver, err := zeroconf.NewResolver(nil)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user