From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-x233.google.com (mail-ig0-x233.google.com [IPv6:2607:f8b0:4001:c05::233]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 951D5791EB for ; Fri, 1 Jan 2016 11:08:39 -0800 (PST) Received: by mail-ig0-x233.google.com with SMTP id ph11so211926047igc.1 for ; Fri, 01 Jan 2016 11:09:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geoffair-info.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=87f/1mYP3e7iPzq1++SnyocykIpTrMp2PuThFUAo66o=; b=sm7iPEfVhv0zUvTeb9zlwq8N6SOYwU4XRHzVSR0ZB7YIb+P4gq9o/IvT3Zc8xeApiC hJ3pLHR5ZHuHyT+eJahlelupjXN3WgUA7VPVaNM7i4AiExFcMInCayBXgI++aYePc3Ku QIocPZ3gzQXTVvn1v2ghZ7pf9xOYsR2sijspDjaTEv2ZTjiQXfGcZ1FFMeOkQ8USi2sQ EvvLm102xVFhUaiCHAaK7tfbbG5zCwjIO7kk5G5dKpiWnyFGipqXpaAyvuKFo/AN8h/S mpgtB6G1ikzUrF7JrjaLMPmZhRpTK+NxAv4ZQ4mT3sOtpGR8mWWirGQ777r0nZM7SsrK af7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=87f/1mYP3e7iPzq1++SnyocykIpTrMp2PuThFUAo66o=; b=ORy2KhkoRK9e396zJxPlFSxvWi4knCUh3vtb1xWazq1MYBmk2bqz3XYhQvfcVGWe1b RRqZydbqYxN7wrelxB4za5pu5X8B4/Dg2SGnyetWPKg9PwNFVCDzZzVdy11tCi+R0o7k sMCRxcAohA9T5zdZVTtFhIqYjZy/af/sZPVkXoF/5UJrG3RiMn92A1oSaYZDWWb48JaY 9riuI1z2Jmwv1pAzDGvnTCcwl/posYyVqvIRkupT9EKXUJjDQqPm6L46EyVYTH6pYWeq KPXyGrtfOyyyIVogRBrlijr+50gpNnnxyJiyR8lwEXow76GVBKtPuvVV5EtpYS/xkDF3 NPAA== X-Gm-Message-State: ALoCoQke3mJ/H1LEF5n0KGOpIT9xY24H3S1N/1kBFiYmAhPYKbuoZf32KLWSQ9SU5nidM2rGBLCYR8OuX8fwo9APo02fjca6Gg== MIME-Version: 1.0 X-Received: by 10.50.88.7 with SMTP id bc7mr20048739igb.24.1451675350476; Fri, 01 Jan 2016 11:09:10 -0800 (PST) Received: by 10.79.109.8 with HTTP; Fri, 1 Jan 2016 11:09:10 -0800 (PST) In-Reply-To: <20160001100135.eklhad@comcast.net> References: <20151130125742.eklhad@comcast.net> <20160101142238.GB24842@122oven.adamthompson.me.uk> <20160001100135.eklhad@comcast.net> Date: Fri, 1 Jan 2016 20:09:10 +0100 Message-ID: From: Geoff McLane To: Karl Dahlke Cc: Edbrowse-dev@lists.the-brannons.com Content-Type: multipart/alternative; boundary=089e0118416898474805284a81fa Subject: Re: [Edbrowse-dev] Ports X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2016 19:08:39 -0000 --089e0118416898474805284a81fa Content-Type: text/plain; charset=UTF-8 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... --089e0118416898474805284a81fa Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Karl, Adam,
<= br>
Well I think pipes and sockets seem certainly the most=C2=A0<= /div>
practical cross-platform IPC mechanisms...=C2=A0

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

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

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

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

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

I am sure unix has some form of shared memory mapping (5)... just= =C2=A0
copy a data block using a simple memory pointer would prob= ably be=C2=A0
the fastest... but requires that the partner be mon= itoring that=C2=A0
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. P= ipes and Sockets=C2=A0
both work... with no porting issues that I= know of...

Concerning sockets, over the years I h= ave collected some tcp,=C2=A0
udp samples, and this is where I ad= ded and tested Karl's=C2=A0
socket.c - and pushed them all to= my 'new' tcp-tests repo -



--089e0118416898474805284a81fa--