Skip to content

Commit

Permalink
Refactoring code
Browse files Browse the repository at this point in the history
  • Loading branch information
skiffer-git committed Feb 17, 2022
1 parent e4de3fe commit a5eb81b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
13 changes: 9 additions & 4 deletions main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func main() {

strMyUidx := "18666662412"
//friendUserID := "openIM2222"
tokenx := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVSUQiOiIxODY2NjY2MjQxMiIsIlBsYXRmb3JtIjoiSU9TIiwiZXhwIjoxNjQ1NjE2NzI2LCJuYmYiOjE2NDUwMTE5MjYsImlhdCI6MTY0NTAxMTkyNn0.AR9khKiUXNDUu1gxNY7cqeZmmDyIMXFd6hlnJsppt0o"
tokenx := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVSUQiOiIxODY2NjY2MjQxMiIsIlBsYXRmb3JtIjoiSU9TIiwiZXhwIjoxNjQ1Njg5NjU3LCJuYmYiOjE2NDUwODQ4NTcsImlhdCI6MTY0NTA4NDg1N30.nV3cIcvaRjyUEay8G7UMe5LzKeNi6UenET1RXDT4Nao"
test.InOutDoTest(strMyUidx, tokenx, WSADDR, APIADDR)
//test.DoTestCreateGroup()
//test.SetTestFriendID(friendUserID)
Expand Down Expand Up @@ -68,10 +68,15 @@ func main() {
// open_im_sdk.DoTestDeleteFromBlackList()
//DoTestGetDesignatedFriendsInfo()
//test.DoTestSendMsg(strMyUidx, test.Friend_uid)
test.DoTestSendImageMsg("", test.Friend_uid)
// test.DoTestSendImageMsg("", test.Friend_uid)
i := 0
for true {
time.Sleep(time.Duration(100) * time.Second)
// test.DoTestSendMsg(strMyUidx, test.Friend_uid)

time.Sleep(time.Duration(1) * time.Second)

test.DoTestSendMsg(strMyUidx, test.Friend_uid)
i++
fmt.Println("DoTestSendMsg count: ", i)
fmt.Println("waiting")
}
//
Expand Down
3 changes: 3 additions & 0 deletions ws_wrapper/ws_local_server/ws_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ func GenUserRouterNoLock(uid string) *RefRouter {
wsRouter1.SetFriendListener()
wrapSdkLog("SetGroupListener() ", uid)
wsRouter1.SetGroupListener()
wrapSdkLog("SetUserListener() ", uid)
wsRouter1.SetUserListener()

var rr RefRouter
rr.refName = &RouteMap1
rr.wsRouter = &wsRouter1
Expand Down

0 comments on commit a5eb81b

Please sign in to comment.