• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 06:48
CEST 12:48
KST 19:48
  • 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
Serral wins HomeStory Cup 2914Serral wins Maestros of the Game 243ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12
Community News
Weekly Cups (July 27-Aug 2): SHIN's big week0SC4ALL II: Brood War - $2500 - Dec 5-66SC4ALL II announced - $10,000 prize pool, Dec 5-64PIG STY FESTIVAL 8.0! (13 - 23 August)11Neeb returns to progaming; rejoins ONSYDE17
StarCraft 2
General
Neeb returns to progaming; rejoins ONSYDE SC4ALL II: StarCraft 2 Player Announcement 2/8 Balance hotfix patch 5.0.16b (July 16) August World Ranking: Clem climbs to #2 Daily SC2 Player Grid - feedback wanted
Tourneys
Tasteless Time Warp: SC Evo Showmatch (May 25) SC4ALL II announced - $10,000 prize pool, Dec 5-6 Sparkling Tuna Cup - Weekly Open Tournament PIG STY FESTIVAL 8.0! (13 - 23 August) RSL Revival: Season 6 - Qualifiers and Main Event
Strategy
[G] Having the right mentality to improve
Custom Maps
Nexus Wars 2021 GUIDE [M] (2) Industrial Park
External Content
The PondCast: SC2 News & Results Mutation # 537 Hostile Territory Mutation # 536 Railroad Switch Mutation # 535 Assembly of Vengeance
Brood War
General
BW General Discussion ASL22 General Discussion [Personal Project Share] Terran Defense v0.60 BW Drama: Terror's Debt Incident + C9 disbanding Recent recommended BW games
Tourneys
[Megathread] Daily Proleagues 2v2v2v2 Tournament SC4ALL II: Brood War - $2500 - Dec 5-6 Escore Tournament - Season 3
Strategy
Any training maps people recommend? Fighting Spirit mining rates Simple Questions, Simple Answers Odyssey Mineral Stack Saturation
Other Games
General Games
ZeroSpace Early Access is Now Live! Stormgate/Frost Giant Megathread General RTS Discussion Thread Nintendo Switch Thread Beyond All Reason
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
[TL LoL EUW IHs] Teemo shall perish TSM pausing esports and CLG Dead
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Power Rank TL Mafia Community Thread NeO.D_StephenKing vs This Guy From 1 Million Dance
Community
General
European Politico-economics QA Mega-thread US Politics Mega-thread Russo-Ukrainian War Thread Artificial Intelligence Thread Things Aren’t Peaceful in Palestine
Fan Clubs
The Clem Fan Club INnoVation Fan Club The Scarlett Fan Club
Media & Entertainment
Anime Discussion Thread Movie Discussion! Series you have seen recently... [Req][Books] Good Fantasy/SciFi books
Sports
Football (Soccer) Thread TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion MLB/Baseball 2023 McBoner: A hockey love story
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Simple Questions Simple Answers FPS when play League Of Legend on laptop
TL Community
The Automated Ban List Northern Ireland Global Starcraft
Blogs
Please support my new stand…
Peanutsc
What is a Gamer?
TrAiDoS
Hello guys!
LIN1s
ASL S22 English Commentary…
namkraft
Poker (part 2)
Nebuchad
Customize Sidebar...

Website Feedback

Closed Threads



Active: 3617 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
Canada723 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 12m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Rex 1
StarCraft: Brood War
Calm 6612
Horang2 1249
Bisu 1177
Shuttle 671
Jaedong 374
BeSt 274
Mini 229
Larva 203
Mind 195
Dewaltoss 178
[ Show more ]
Soulkey 176
Zeus 164
ggaemo 110
Last 110
hero 98
Snow 97
EffOrt 92
Light 81
Pusan 69
Hyun 62
ToSsGirL 60
ZerO 58
JYJ 56
Sexy 39
sorry 39
PianO 38
Killer 30
Hm[arnc] 27
JulyZerg 25
yabsab 24
Bale 24
Terrorterran 20
Nal_rA 18
Sacsri 18
Barracks 12
Noble 11
soO 10
NotJumperer 9
Dota 2
Gorgc10623
League of Legends
JimRising 338
Counter-Strike
olofmeister802
shoxiejesuss664
Other Games
crisheroes227
Sick118
B2W.Neo80
Livibee59
ZerO(Twitch)5
Organizations
Other Games
gamesdonequick467
StarCraft 2
IntoTheiNu 51
WardiTV2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 14 non-featured ]
StarCraft 2
• StrangeGG 55
• Light_VIP 33
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV386
League of Legends
• Jankos1045
Upcoming Events
Kung Fu Cup
12m
Replay Cast
13h 12m
The PondCast
23h 12m
OSC
23h 12m
INu's Battles
1d
Percival vs Cure
Classic vs Clem
Replay Cast
1d 13h
Escore
1d 23h
IntoTheTV X SOOP
2 days
RSL Revival
2 days
herO vs SHIN
Clem vs Solar
Serral vs Rogue
RSL Revival
3 days
[ Show More ]
WardiTV Weekly
5 days
The Patches Monday
5 days
Sparkling Tuna Cup
5 days
PiG Sty Festival
6 days
PiGosaur Cup
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-08-04
CranK Gathers Season 4: BW vs SC2 Team League
Eternal Conflict S2 Finale

Ongoing

KCM Race Survival 2026 Season 3
K-JUNGMAN
Acropolis #5
RSL Revival: Season 6
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026

Upcoming

Escore Tournament S3: W6
Escore Tournament S3: W7
CSLAN 4
ASL Season 22
Escore Tournament S3: W8
Acropolis #5 - TRS
Blizzard Classic Cup 2026
HSC XXX
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
PiG Sty Festival 8.0
Big Dog Cup 2026 Div 1
Thunderpick World Champ.
ESL Pro League Season 24
Stake Ranked Episode 4
Logitech G Connect 2026
SL StarSeries Fall 2026
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 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.