• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 06:10
CEST 12:10
KST 19:10
  • 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
Code S Season 1 - RO8 Preview1[ASL21] Ro8 Preview Pt2: Progenitors8Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun13[ASL21] Ro8 Preview Pt1: Inheritors16[ASL21] Ro16 Preview Pt2: All Star10
Community News
Weekly Cups (April 27-May 4): Clem takes triple0RSL Revival: Season 5 - Qualifiers and Main Event11Code S Season 1 (2026) - RO12 Results12026 GSL Season 1 Qualifiers25Maestros of the Game 2 announced9
StarCraft 2
General
Code S Season 1 - RO8 Preview Behind the Blue - Team Liquid History Book Weekly Cups (April 27-May 4): Clem takes triple Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool Code S Season 1 (2026) - RO12 Results
Tourneys
GSL Code S Season 1 (2026) Sparkling Tuna Cup - Weekly Open Tournament RSL Revival: Season 5 - Qualifiers and Main Event StarCraft Evolution League (SC Evo Biweekly) 2026 GSL Season 2 Qualifiers
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
Mutation # 524 Death and Taxes The PondCast: SC2 News & Results Mutation # 523 Firewall Mutation # 522 Flip My Base
Brood War
General
(Spoiler) Asl ro8 D winner interview BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ Do we have a pimpest plays list? AI Question
Tourneys
[ASL21] Ro8 Day 4 [ASL21] Ro8 Day 3 [Megathread] Daily Proleagues [ASL21] Ro8 Day 2
Strategy
Simple Questions, Simple Answers Fighting Spirit mining rates What's the deal with APM & what's its true value Any training maps people recommend?
Other Games
General Games
Stormgate/Frost Giant Megathread Dawn of War IV OutLive 25 (RTS Game) Daigo vs Menard Best of 10 Nintendo Switch Thread
Dota 2
The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
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
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread European Politico-economics QA Mega-thread Russo-Ukrainian War Thread 3D technology/software discussion Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [Req][Books] Good Fantasy/SciFi books
Sports
2024 - 2026 Football Thread Formula 1 Discussion McBoner: A hockey love story
World Cup 2022
Tech Support
streaming software Strange computer issues (software) [G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Movie Stars In Video Games: …
TrAiDoS
ramps on octagon
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1598 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
Canada722 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
GSL
09:30
2026 Season 1: Ro8 Group A
Classic vs CureLIVE!
Maru vs Rogue
IntoTheiNu 778
Ryung 299
CranKy Ducklings SOOP81
herO (SOOP)46
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Ryung 299
herO (SOOP) 46
Rex 15
StarCraft: Brood War
BeSt 1462
Hyuk 373
actioN 261
Killer 209
Rush 194
Stork 192
EffOrt 125
hero 114
Mind 87
Mong 81
[ Show more ]
ggaemo 66
Aegong 58
Backho 58
Soulkey 57
ZerO 54
sSak 42
Shine 31
Bale 21
Sacsri 17
Noble 17
Last 15
soO 14
SilentControl 7
ajuk12(nOOB) 7
GoRush 3
League of Legends
JimRising 389
Counter-Strike
olofmeister2089
zeus621
allub298
edward49
Super Smash Bros
Westballz26
Other Games
summit1g5852
singsing307
monkeys_forever150
Mew2King71
ZerO(Twitch)7
Organizations
Other Games
gamesdonequick571
Dota 2
PGL Dota 2 - Main Stream25
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 15 non-featured ]
StarCraft 2
• LUISG 34
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 6
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• TFBlade1087
• Jankos962
• Stunt458
Upcoming Events
GSL
23h 20m
SHIN vs Zoun
ByuN vs herO
OSC
1d
OSC
1d 2h
Replay Cast
1d 13h
Escore
1d 23h
The PondCast
1d 23h
WardiTV Invitational
2 days
Zoun vs Ryung
Lambo vs ShoWTimE
OSC
2 days
Replay Cast
2 days
CranKy Ducklings
2 days
[ Show More ]
RSL Revival
2 days
SHIN vs Bunny
ByuN vs Shameless
WardiTV Invitational
3 days
Krystianer vs TriGGeR
Cure vs Rogue
uThermal 2v2 Circuit
3 days
BSL
3 days
Replay Cast
3 days
Sparkling Tuna Cup
3 days
RSL Revival
3 days
Cure vs Zoun
Clem vs Lambo
WardiTV Invitational
4 days
BSL
4 days
GSL
4 days
Afreeca Starleague
4 days
Soma vs Leta
Monday Night Weeklies
5 days
CranKy Ducklings
5 days
Afreeca Starleague
5 days
Light vs Flash
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-05-05
WardiTV TLMC #16
Nations Cup 2026

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
Acropolis #4
YSL S3
SCTL 2026 Spring
RSL Revival: Season 5
2026 GSL S1
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026

Upcoming

Escore Tournament S2: W6
KK 2v2 League Season 1
BSL 22 Non-Korean Championship
Escore Tournament S2: W7
Escore Tournament S2: W8
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
2026 GSL S2
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 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.