On 27 Nov 2008, at 17:17, LANS wrote:
>
> This is my todo list for the network stuff.
>
> - add no-data message handling to the client side
>
I thought that was already in place, unless I misunderstand you.
> - Find somewhere to store a stable variable (one that is consistent
> from the time the app launches until it quits. Where should I store
> it?)
A static variable in NetClient.cpp (or NetServer.cp)
>
>
> - Implement a counter that increases this variable once per no-data
> message (no-data messages are created when a bad message is recieved)
> - Set up a way to either kick the client or disconnect from the host
> when enough bad messages are recieved (what should the limit be?)
>
Ideally: 5, or 2 within 10 seconds.
> - Implement RSA key generation on application startup
> - Implement blowfish key generation on server startup (do these need
> to be different for each client?)
Yeah, they do.
> - Make the client send its public RSA key to the server when
> connecting, so the server can encrypt the blowfish key with RSA and
> return it to the client.
> - implement blowfish encryption of all messages after the connection
> is established
Indeed, indeed.
> - efficientize everything.
That's the easy bit.
> And that's all I can think that needs to be done on the low-level
> networking side.
The most important thing is the error checking: I might suggest you
focus on that before the security aspect, but that's your call and
it's great that you're getting things working! Cheers.
Alastair
On 27 Nov 2008, at 19:51, LANS wrote:
>
> On Nov 27, 12:22 pm, Alastair Lynn <arpl...@gmail.com> wrote:
>> Hi Andrew-
>>
>> On 27 Nov 2008, at 17:17, LANS wrote:
>>
>>
>>
>>> This is my todo list for the network stuff.
>>
>>> - add no-data message handling to the client side
>>
>> I thought that was already in place, unless I misunderstand you.
>>
> - No-data messages will be created for both the client and server, but
> only the server knows what to do with them so far. The client will
> probably choke, but I'm not too sure how it would handle it.
>
>>> - Find somewhere to store a stable variable (one that is consistent
>>> from the time the app launches until it quits. Where should I store
>>> it?)
>>
>> A static variable in NetClient.cpp (or NetServer.cp)
>>
>>
>>
>>> - Implement a counter that increases this variable once per no-data
>>> message (no-data messages are created when a bad message is
>>> recieved)
>>> - Set up a way to either kick the client or disconnect from the host
>>> when enough bad messages are recieved (what should the limit be?)
>>
>> Ideally: 5, or 2 within 10 seconds.
> - Can I use the time.h library or is there a better way?
Utilities/GameTime.h has a function for getting the time since app
launch in seconds (as a floating-point number).
Checking the validity of message IDs is not a function of that
particular piece of net code - that's higher level, should be handled
in Lua. Making sure that message IDs consist of only the characters A-
Z, a-z, 0-9 and _ might be sensible though, for sending as well as
receiving. eNet puts a CRC32 on each packet, as does UDP, as (I
believe) does IP, so there's error checking at three levels of the
model wrt corruption.
Alastair
If you need code debugged, upload it to a new branch, and please at
least compile it on your machine even if you don't test it, to make
sure that it does compile.
Alastair
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> Groups "Xsera Development" group.
> To post to this group, send email to xser...@googlegroups.com
> To unsubscribe from this group, send email to xsera-dev+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/xsera-dev?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
I put that a bit more explosively than I should have. If you could
push to a different branch (not a different fork!) in future, that
would be great. You can do that by doing 'git push origin
master:network-error-checking" (or replace network-error-checking with
whatever) as opposed to just 'git push'. The 'master' branch is for
working code :P
Alastair