🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #309426

Re: Pewna komunikacja UDP?

#309426
From: Matt D.
Date: Fri, 08 Sep 2017 13:41
30 lines
2249 bytes
On 9/7/2017 22:25, Borneq wrote:
> W dniu 07.09.2017 o 12:18, Wojciech Muła pisze:
>> Jak ma działać na lokalnej maszynie, to czemu nie użyjesz np. pamięci
>> dzielonej albo kolejek nazwanych (named pipes)?
> 
> Chciałem użyć boost.asio, tam były przykłady na echo. Pamięć dzielona 
> może dobre rozwiązanie, ale jak po władowaniu do niej uruchomić drugą 
> stronę.

Boost.Interprocess do tego sluzy -- patrz ponizszy prosty przyklad (kod 
sluzy zarowno jako proces-serwer i proces-klient, ale trywialnie prosty 
do rozdzielenia):

http://www.boost.org/doc/libs/release/doc/html/interprocess/sharedmemorybetweenprocesses.html#interprocess.sharedmemorybetweenprocesses.sharedmemory.shared_memory_a_simple_example

Dokumentacja:
https://theboostcpplibraries.com/boost.interprocess
http://www.boost.org/doc/libs/release/doc/html/interprocess.html

Jak chcesz komunikacje przez siec, to przyjrzabylm sie tez ZeroMQ.
"Hello World in C++"
client: http://zguide.zeromq.org/cpp:hwclient
server: http://zguide.zeromq.org/cpp:hwserver

Jest wybor C++ Bindings: http://zeromq.org/bindings:cpp
N.p., AZMQ Boost Asio + ZeroMQ: https://github.com/zeromq/azmq

Pozdrawiam,

Matt
Technical Details
Message-ID: <oou6ms$17t$1@portraits.wsisiz.edu.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!wsisiz.edu.pl!.POSTED.d40a9d0a.rev.stofanet.dk!not-for-mail
References: <oomu36$vi4$1@node2.news.atman.pl> <ooom9s$bch$4$gof@news.chmurka.net> <oop8ss$5l7$1@node2.news.atman.pl> <726a58be-5ff8-4f2d-9f98-304274f9949a@googlegroups.com> <oos9us$o4$1@node2.news.atman.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!wsisiz.edu.pl!.POSTED.d40a9d0a.rev.stofanet.dk!not-for-mail
From: "Matt D." <no-spam@invalid.local>
Newsgroups: pl.comp.lang.c
Subject: Re: Pewna komunikacja UDP?
Date: Fri, 8 Sep 2017 15:41:47 +0200
Organization: http://www.wit.edu.pl
Sender: mdziubin@nospam.wsisiz.edu.pl
Message-ID: <oou6ms$17t$1@portraits.wsisiz.edu.pl>
References: <oomu36$vi4$1@node2.news.atman.pl> <ooom9s$bch$4$gof@news.chmurka.net> <oop8ss$5l7$1@node2.news.atman.pl> <726a58be-5ff8-4f2d-9f98-304274f9949a@googlegroups.com> <oos9us$o4$1@node2.news.atman.pl>
Mime-Version: 1.0
Injection-Date: Fri, 8 Sep 2017 13:41:48 -0000 (UTC)
Injection-Info: portraits.wsisiz.edu.pl; posting-host="d40a9d0a.rev.stofanet.dk:212.10.157.10"; logging-data="1277"; mail-complaints-to="abuse@wsisiz.edu.pl"
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
In-Reply-To: <oos9us$o4$1@node2.news.atman.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit