[bf1942] Using sqlite with BF2 in Windows

"Einar S. Idsø" esi at itk.ntnu.no
Sun Apr 23 18:34:18 EDT 2006


>>That is so not true. There is no garantee at all that the packet you
>>send is not fragmented by either the local kernel, network or remote
>>kernel.
> I am sure you are right. Like I said, I don't have much experience with
> socket programming, but so far we haven't had any problems with the
> UDP-based adverts that we've been using. But then again I guess if
> something went wrong with a single line of messages, noone would really
> take notice...

Based on a bit more reading, it seems as if as long as the datagram is
smaller than the MTU (including headers), it will be transmitted as one
single packet. This would probably be okay for us, since the commands
transmitted to the servermanager will be relatively short.

>>The guys here have XML RPC up and running for a central ban manager
>>so you might want to pop onto IRC into #mpukhosting and catch
>>either Tom or Boffbowsh to see if they cant point you in the right
>>direction.

I haven't been able to speak with them yet, but I did some research
today on how to make XML-RPC-calls from BF2. After a bit of trickery
including

1. overriding some problems with the os-module related to the broken
sys-module,
2. adding an empty binascii.py (this may also work for importing the
pickle module!), and
3. modifying xmlrpc.py inside of pylib-2.3.4.zip to override
warnings.warn(),

I was able to make xmlrpclib work correctly. This means I can now query
an XML-RPC server from within the BF2 engine. Unfortunately, the
xmlrpclib.ServerProxy seems to be blocking. So if the request takes more
than a few mS to complete, the game will lag - not good!

This makes me a bit worried about your solution too, unless you are
using some sort of asynchronous mechanism that doesn't wait for a
response, e.g. by creating an XML-RPC client using the httplib module
(which also requires some trickery with the os-module because of the
broken sys). I'll see if I can't find Boffbowsh or Tom on IRC sometime
this week.

Cheers,
Einar



More information about the Bf1942 mailing list