Skip to content

Commit 9c091e6

Browse files
authored
Merge pull request #44 from xiaonanln/develop
remove send client id
2 parents c500a29 + 794d897 commit 9c091e6

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

components/gate/ClientProxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (cp *ClientProxy) serve() {
7373
}()
7474

7575
cp.GoWorldConnection.SetAutoFlush(time.Millisecond * 50)
76-
cp.SendSetClientClientID(cp.clientid) // set the clientid on the client side
76+
//cp.SendSetClientClientID(cp.clientid) // set the clientid on the client side
7777

7878
for {
7979
var msgtype proto.MsgType

examples/test_client/ClientBot.go

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ var (
4141
type ClientBot struct {
4242
sync.Mutex
4343

44-
id int
45-
clientid common.ClientID
44+
id int
4645

4746
waiter *sync.WaitGroup
4847
conn *proto.GoWorldConnection
@@ -363,9 +362,9 @@ func (bot *ClientBot) handlePacket(msgtype proto.MsgType, packet *netutil.Packet
363362
bot.updateEntityPosition(entityID, entity.Vector3{x, y, z})
364363
bot.updateEntityYaw(entityID, yaw)
365364
}
366-
} else if msgtype == proto.MT_SET_CLIENT_CLIENTID {
367-
clientid := packet.ReadClientID()
368-
bot.setClientID(clientid)
365+
//} else if msgtype == proto.MT_SET_CLIENT_CLIENTID {
366+
// clientid := packet.ReadClientID()
367+
// bot.setClientID(clientid)
369368
} else {
370369
gwlog.Panicf("unknown msgtype: %v", msgtype)
371370
if consts.DEBUG_MODE {
@@ -374,11 +373,6 @@ func (bot *ClientBot) handlePacket(msgtype proto.MsgType, packet *netutil.Packet
374373
}
375374
}
376375

377-
func (bot *ClientBot) setClientID(clientid common.ClientID) {
378-
gwlog.Infof("%s set client id = %s", bot, clientid)
379-
bot.clientid = clientid
380-
}
381-
382376
func (bot *ClientBot) updateEntityPosition(entityID common.EntityID, position entity.Vector3) {
383377
//gwlog.Debugf("updateEntityPosition %s => %s", entityID, position)
384378
if bot.entities[entityID] == nil {

goworld.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ log_level=debug
5656
compress_connection=1
5757
; supported compress formats: gwsnappy|snappy|flate|lz4|lzw
5858
compress_format=gwsnappy
59-
encrypt_connection=1
59+
encrypt_connection=0
6060
rsa_key=rsa.key
6161
rsa_certificate=rsa.crt
6262
heartbeat_check_interval = 0

0 commit comments

Comments
 (0)