GNet message objects do not have a _peer value

BlitzMax Forums/BlitzMax Programming/GNet message objects do not have a _peer value

Blueapples(Posted 2008) [#1]
This is sort of a problem for me... and I'm wondering how GNet messages can be trusted at all if they don't tell me what client they have come from?

I can probably hack around this using some kind of session token... maybe, but then how do I know that the session token itself is authentic if the mechanism I use to send it to the client (a GNet message objects) doesn't let my code in the client confirm it's even been read from a valid peer?

Anyone else run into this? Got a patch or maybe I'm missing something? I'll poke around in there and try to fix it myself obviously, just wanted to throw it out there.


Blueapples(Posted 2008) [#2]
Well the fix was pretty easy, change line 502 of gnet.bmx from
obj=TGNetObject.Create( msg.id,GNET_MESSAGE,Self,null )

to
obj=TGNetObject.Create( msg.id,GNET_MESSAGE,Self,peer )


I'm a bit worried I'm missing something and this little change will cause me tons of problems, but it seems to work.


C64(Posted 2009) [#3]
Hi,

I have try'd and try'd, i modified the code from gnet.bmx (line 502) but
it doesn't work.

I can't get the peer from a message.

PLEASE HELP !!!