Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > Re: socket crea...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 11 of 16 Topic 26070 of 26821
Post > Topic >>

Re: socket creation

by "cr88192" <cr88192@[EMAIL PROTECTED] > May 6, 2008 at 09:25 AM

"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...
 




 16 Posts in Topic:
socket creation
udayahirwal2@[EMAIL PROTE  2008-05-05 06:24:08 
Re: socket creation
Flash Gordon <spam@[EM  2008-05-05 15:41:00 
Re: socket creation
Antoninus Twink <nospa  2008-05-05 18:27:17 
Re: socket creation
Keith Thompson <kst-u@  2008-05-05 09:41:26 
Re: socket creation
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-05 10:09:12 
Re: socket creation
roberson@[EMAIL PROTECTED  2008-05-05 17:37:28 
Re: socket creation
Flash Gordon <spam@[EM  2008-05-05 21:06:57 
Re: socket creation
CBFalconer <cbfalconer  2008-05-05 19:19:05 
Re: socket creation
"cr88192" <c  2008-05-06 15:59:58 
Re: socket creation
William Ahern <william  2008-05-06 14:06:05 
Re: socket creation
"cr88192" <c  2008-05-06 09:25:42 
Re: socket creation
CBFalconer <cbfalconer  2008-05-06 19:39:44 
Re: socket creation
Eligiusz Narutowicz<el  2008-05-06 14:18:45 
Re: socket creation
William Ahern <william  2008-05-06 13:56:58 
Re: socket creation
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-06 05:31:10 
Re: socket creation
"soscpd@[EMAIL PROTE  2008-05-06 07:36:17 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 9 0:41:34 CDT 2008.