"Tomás Ó hÉilidhe" <toe@[EMAIL PROTECTED]
> wrote in message
news:4458e116-2d6d-4554-aa4d-9616d2df4344@[EMAIL PROTECTED]
May 5, 2:24 pm, udayahirw...@[EMAIL PROTECTED]
wrote:
>> Can i create 4 sockets on same ip address with different ****tnumbers.
>> I am working on windows mobile.
>
> Yes, you certainly can, and you can do it ****tably so that your code
> will compile for Linux, Windows, Solaris, Playstation 3, what have
> you.
>
> You'll need to use a cross-platform library for doing so, the big two
> being pCap and "Berkeley sockets".
how about this:
cross-platform socket sup****t is just a few #ifdef's away...
sadly, IME, this is often one of the "best" ways to do inter-OS
****tability,
namely because, most often, these cross-platform libraries, are rarely if
ever present, and even then, usually only sup****t a few platforms and do
things that would not be so hard to pull off, simply by using ifdef's or
or
occasionally swapping out source files...
Linux, Windows, and Solaris:
this should actually be fairly easy with ifdef's, since they use fairly
similar sockets interfaces.
PS3 should be likewise, since AFAIK the thing is just running linux,
likewise for XBox (modified windows core).
WinCE is also, likewise, windows... what ever differences there are in
terms
of API calls, are usually noted in the help files (usually, it is
differences along the lines of special flags working, and others having no
effect, ...).
other further systems, depends on what is provided.
IMO, "universal ****tability" is an ill-advised goal anyways. often I have
seen a lot more damage than good done this route. usual worst case: the
code
has to be ****ted.
worst case, if one depends too heavily on some ill-fated ****tability
library:
much of the app ends up having to be discarded or rewritten...
my personal advice is too keep as much platform-specific machinery as is
reasonable in small, easily replacable, source files. these can provide a
kind of app-specific ****tability layer.
in this case, moving between the platforms is usually a matter of using
different source files, and moving to a new one may involve tweaking the
existing ones or adding a few new ones.
this usually works a lot better than it is given credit for...


|