edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Geoff McLane <ubuntu@geoffair.info>
To: Karl Dahlke <eklhad@comcast.net>
Cc: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] Ports
Date: Fri, 1 Jan 2016 20:09:10 +0100	[thread overview]
Message-ID: <CA+Pgot+Dg3Aw7BxqEExJvb8_3wdW2mXUgraq9xKGpYxbYiekkA@mail.gmail.com> (raw)
In-Reply-To: <20160001100135.eklhad@comcast.net>

[-- Attachment #1: Type: text/plain, Size: 2176 bytes --]

Hi Karl, Adam,

Well I think pipes and sockets seem certainly the most
practical cross-platform IPC mechanisms...

Pipes seems to have less difference in that only perhaps
a few #ifdef WIN32 are required, if any, in a cross-compile...

Sockets definitely does require a number of #ifdef WIN32,
but not really excessive... many can be handled as MACROS...
and the cross-porting has been done MANY times... in lots
and lots of libraries, apps, utilities, so is sort of very
mature... getting easy even...

But reading up a little on MSDN, and remembering, the
following IPC mechanisms are available in Windows, but
for sure some are **WINDOWS ONLY**!

1. Clipboard/DDE - can agree a format then do copy/paste
2. COM - OLE manage compound document interface
3. Data Copy - Using Windows messaging - WM_COPYDATA
4. RPC - have only ever used it over sockets...
5. File Mapping or shared memory mapping - just put data
6. Pipes and Sockets - are cross-platform...

Not sure which of these would fit "domain sockets", but maybe
I missed something else available... having coded and used
most of them, in various apps, at various time, I am not sure
which I would choose as the most 'generic' to Windows...

I am sure unix has some form of shared memory mapping (5)... just
copy a data block using a simple memory pointer would probably be
the fastest... but requires that the partner be monitoring that
space, polling... and what about thread safety? and maybe needs
some/many #ifdef to account for the differences...

But as Karl mentions he has already shown 6. Pipes and Sockets
both work... with no porting issues that I know of...

Concerning sockets, over the years I have collected some tcp,
udp samples, and this is where I added and tested Karl's
socket.c - and pushed them all to my 'new' tcp-tests repo -

https://github.com/geoffmcl/tcp-tests

See src/ebsocket.c... compiles without even a warning both
in WIN32 and UNIX... still to do a WIN64 compile... and
maybe a MinGW compile... sockets are fun ;=)) and really
now quite an old technology that has not been replaced...

Regards,
Geoff.

PS: I have now 'subscibed' to the dev list... so should
be no need to cc me...

[-- Attachment #2: Type: text/html, Size: 2977 bytes --]

  parent reply	other threads:[~2016-01-01 19:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-30 17:57 Karl Dahlke
2015-12-31  2:54 ` Chris Brannon
2015-12-31  3:05   ` Karl Dahlke
2016-01-01 14:22     ` Adam Thompson
2016-01-01 15:01       ` Karl Dahlke
2016-01-01 18:50         ` Adam Thompson
2016-01-01 19:11           ` Karl Dahlke
2016-01-01 19:32             ` Chris Brannon
2016-01-01 19:09         ` Geoff McLane [this message]
2016-01-01 19:31           ` Adam Thompson
2016-01-01 19:38             ` Karl Dahlke
2015-12-31  3:34   ` Karl Dahlke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+Pgot+Dg3Aw7BxqEExJvb8_3wdW2mXUgraq9xKGpYxbYiekkA@mail.gmail.com \
    --to=ubuntu@geoffair.info \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    --cc=eklhad@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).