Page 1 of 1

Reusing socket programming for Win32/PocketPC

PostPosted: May 20, 2007 @ 11:17pm
by Staryon
Hi,

I am writing a 2D Space shooting game using Visual C++ and the Gapidraw library. My IDE is VS2005.

My idea for this game is to be compatible with Windows and Pocket PC devices.

So far everything is going perfect. Now I would like to add some code that uploads high scores to a database. I need to write a basic TCP/IP client connection but I'm not sure how to make it compatible with both systems.

Is that possible or I need to have a different code for each one?

Thanks

PostPosted: May 21, 2007 @ 12:16am
by Dan East
Just use the standard Berkeley socket API. Besides a unicode conversion here or there, the same code will build right up for both platforms.

Dan East

PostPosted: May 21, 2007 @ 2:30pm
by Presto
Here are a bunch of examples:
http://www.sockaddr.com/ExampleSourceCode.html

One thing I noticed is that for the desktop you link using wsock32.lib, but for WM using winsock.lib. Your code doesn't change at all though.

-John

PostPosted: May 21, 2007 @ 3:06pm
by mm40

PostPosted: May 21, 2007 @ 3:32pm
by Staryon

PostPosted: May 21, 2007 @ 3:58pm
by Staryon

PostPosted: May 21, 2007 @ 5:54pm
by mm40

PostPosted: May 21, 2007 @ 7:33pm
by Staryon