• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 16:59
CET 22:59
KST 06:59
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
HomeStory Cup 28 - Info & Preview11Rongyi Cup S3 - Preview & Info3herO wins SC2 All-Star Invitational14SC2 All-Star Invitational: Tournament Preview5RSL Revival - 2025 Season Finals Preview8
Community News
Weekly Cups (Jan 26-Feb 1): herO, Clem, ByuN, Classic win0RSL Season 4 announced for March-April5Weekly Cups (Jan 19-25): Bunny, Trigger, MaxPax win3Weekly Cups (Jan 12-18): herO, MaxPax, Solar win0BSL Season 2025 - Full Overview and Conclusion8
StarCraft 2
General
Weekly Cups (Jan 26-Feb 1): herO, Clem, ByuN, Classic win StarCraft 2 Not at the Esports World Cup 2026 HomeStory Cup 28 - Info & Preview Weekly Cups (Jan 19-25): Bunny, Trigger, MaxPax win Oliveira Would Have Returned If EWC Continued
Tourneys
RSL Season 4 announced for March-April HomeStory Cup 28 $21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7) KSL Week 85 OSC Season 13 World Championship
Strategy
Simple Questions Simple Answers
Custom Maps
[A] Starcraft Sound Mod
External Content
Mutation # 511 Temple of Rebirth The PondCast: SC2 News & Results Mutation # 510 Safety Violation Mutation # 509 Doomsday Report
Brood War
General
Can someone share very abbreviated BW cliffnotes? Liquipedia.net NEEDS editors for Brood War BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion [ASL21] Potential Map Candidates
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 Azhi's Colosseum - Season 2 [BSL21] Non-Korean Championship - Starts Jan 10
Strategy
Zealot bombing is no longer popular? Simple Questions, Simple Answers Current Meta Soma's 9 hatch build from ASL Game 2
Other Games
General Games
Battle Aces/David Kim RTS Megathread Nintendo Switch Thread Path of Exile Mobile Legends: Bang Bang Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas Vanilla Mini Mafia
Community
General
US Politics Mega-thread European Politico-economics QA Mega-thread The Games Industry And ATVI Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread
Fan Clubs
The herO Fan Club! The IdrA Fan Club
Media & Entertainment
[Manga] One Piece Anime Discussion Thread
Sports
2024 - 2026 Football Thread
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Let's Get Creative–Video Gam…
TrAiDoS
My 2025 Magic: The Gathering…
DARKING
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2485 users

[H] Named Pipes?

Blogs > Phyre
Post a Reply
Phyre
Profile Blog Joined December 2006
United States1288 Posts
Last Edited: 2009-11-11 03:08:49
November 11 2009 02:39 GMT
#1
Hey everyone, still working on that project from my last blog entry and I've been using something called Named Pipes for my inter-process communication. I've got a few questions if anyone here is familiar with the use of Named Pipes.

The big question I've got is if a server app is going to be sending a constant stream of small messages to a client app should I be creating a new instance of the named pipe every time I send a message and then closing it when I'm done to get ready for the next message or is there a way to keep reusing the same instance over and over?

The other is how do I get the server to accept a second client after the first client has been closed? As of right now I start up my server and connect a client to it just fine, but if I close the client and restart it I can't get it to reconnect to the server.

EDIT: I've got the client reconnecting just find, so the second question is solved. However, I'm doing this by destroying the current instance when the client disconnects and then creating a new one to wait for the next client. I'm not sure if this is the intended way to use Named Pipes.


"Oh no, I got you with your pants... on your face... That's not how you wear pants." - Nintu, catching 1 hatch lurks.
tarpman
Profile Joined February 2009
Canada719 Posts
November 11 2009 03:11 GMT
#2
From your description I'm assuming you're doing this under Windows. For a constant stream of messages you should keep the same file handle open until you're done your session (much as you would a TCP socket). Have a look at MSDN's example code. If you still can't get it to work pastebin a minimal test case that demonstrates the problem you're having.
Saving the world, one kilobyte at a time.
MrChance
Profile Joined March 2009
Germany51 Posts
Last Edited: 2009-11-11 03:24:26
November 11 2009 03:20 GMT
#3
Named pipes don't sound like the right choice here, their functionality is limited and not really suited to client server problems imo. There should be a way to make it work without recreating the pipe and making reconnects possible.

edit:nvm, tarpmans suggestions sounds viable.

However, you might want to take a look at boost.interprocess or the like for alternatives. Boost is a C++ library, but the concepts and different methods there should be available in C# too. That should save you the hassle of forcing the pipe system into something it probably wasn't meant for.

I'm not much of a C# programmer, usually work under linux (where I would recommend sockets )
Hope that helps!
This is just like television, only you can see much further
Phyre
Profile Blog Joined December 2006
United States1288 Posts
Last Edited: 2009-11-15 15:46:00
November 15 2009 01:19 GMT
#4
On November 11 2009 12:20 MrChance wrote:
Named pipes don't sound like the right choice here, their functionality is limited and not really suited to client server problems imo. There should be a way to make it work without recreating the pipe and making reconnects possible.

edit:nvm, tarpmans suggestions sounds viable.

However, you might want to take a look at boost.interprocess or the like for alternatives. Boost is a C++ library, but the concepts and different methods there should be available in C# too. That should save you the hassle of forcing the pipe system into something it probably wasn't meant for.

I'm not much of a C# programmer, usually work under linux (where I would recommend sockets )
Hope that helps!

I've heard good things about Boost, I'll have to look into that. Funny that you would mention that about linux, a friend of mine I asked about this earlier said the exact same thing.
"Oh no, I got you with your pants... on your face... That's not how you wear pants." - Nintu, catching 1 hatch lurks.
Please log in or register to reply.
Live Events Refresh
Next event in 2h 2m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
UpATreeSC 218
PiGStarcraft146
Nathanias 112
Temp0 63
StarCraft: Brood War
Rain 3723
Shuttle 99
Dewaltoss 77
firebathero 74
910 21
NaDa 16
yabsab 9
League of Legends
C9.Mang0146
Counter-Strike
kRYSTAL_34
Other Games
summit1g5650
Grubby3906
Beastyqt799
Liquid`Hasu207
ArmadaUGS138
Harstem105
ZombieGrub48
KnowMe30
RuFF_SC227
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 23 non-featured ]
StarCraft 2
• kabyraGe 246
• StrangeGG 74
• musti20045 40
• davetesta10
• LaughNgamezSOOP
• sooper7s
• AfreecaTV YouTube
• intothetv
• Migwel
• Kozan
• IndyKCrew
StarCraft: Brood War
• blackmanpl 49
• HerbMon 34
• Eskiya23 20
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota21222
• lizZardDota289
• Noizen45
League of Legends
• imaqtpie2840
• TFBlade1392
Other Games
• Shiphtur252
Upcoming Events
Replay Cast
2h 2m
Wardi Open
14h 2m
PiGosaur Cup
1d 3h
WardiTV Invitational
1d 14h
Replay Cast
2 days
The PondCast
2 days
WardiTV Invitational
2 days
Replay Cast
3 days
RongYI Cup
4 days
uThermal 2v2 Circuit
5 days
[ Show More ]
Replay Cast
6 days
Wardi Open
6 days
Monday Night Weeklies
6 days
Liquipedia Results

Completed

Proleague 2026-02-01
HSC XXVIII
Underdog Cup #3

Ongoing

CSL 2025 WINTER (S19)
KCM Race Survival 2026 Season 1
Acropolis #4 - TS4
Proleague 2026-02-02
Rongyi Cup S3
Nations Cup 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8

Upcoming

Escore Tournament S1: W7
Escore Tournament S1: W8
Acropolis #4
IPSL Spring 2026
HSC XXIX
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
RSL Revival: Season 4
LiuLi Cup: 2025 Grand Finals
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
PGL Cluj-Napoca 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.