• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 03:24
CEST 09:24
KST 16:24
  • 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 - RO12 Group A: Rogue, Percival, Solar, Zoun11[ASL21] Ro8 Preview Pt1: Inheritors16[ASL21] Ro16 Preview Pt2: All Star10Team Liquid Map Contest #22 - The Finalists21[ASL21] Ro16 Preview Pt1: Fresh Flow9
Community News
2026 GSL Season 1 Qualifiers25Maestros of the Game 2 announced92026 GSL Tour plans announced15Weekly Cups (April 6-12): herO doubles, "Villains" prevail1MaNa leaves Team Liquid25
StarCraft 2
General
Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun Team Liquid Map Contest #22 - The Finalists Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool MaNa leaves Team Liquid Maestros of the Game 2 announced
Tourneys
GSL Code S Season 1 (2026) SC2 INu's Battles#15 <BO.9 2Matches> WardiTV Spring Cup RSL Revival: Season 5 - Qualifiers and Main Event SEL Masters #6 - Solar vs Classic (SC: Evo)
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
The PondCast: SC2 News & Results Mutation # 523 Firewall Mutation # 522 Flip My Base Mutation # 521 Memorable Boss
Brood War
General
Pros React To: Leta vs Tulbo (ASL S21, Ro.8) ASL21 General Discussion [TOOL] Starcraft Chat Translator JaeDong's ASL S21 Ro16 Post-Review Missed out on ASL tickets - what are my options?
Tourneys
Escore Tournament StarCraft Season 2 [ASL21] Ro8 Day 2 [ASL21] Ro8 Day 1 ASL Season 21 LIVESTREAM with English Commentary
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers What's the deal with APM & what's its true value Any training maps people recommend?
Other Games
General Games
Daigo vs Menard Best of 10 Stormgate/Frost Giant Megathread Nintendo Switch Thread Dawn of War IV Diablo IV
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
[Manga] One Piece Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books Movie Discussion!
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
Sexual Health Of Gamers
TrAiDoS
lurker extra damage testi…
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2550 users

Java server/client

Blogs > wo0py
Post a Reply
wo0py
Profile Blog Joined July 2006
Netherlands922 Posts
June 01 2009 09:39 GMT
#1
Dear readers,

My first blogpost because blogs are known for problems and such.

I have started programming in Java years ago, but now i have to revisit the Runtime after a long periode of C-sharp and C++ programming.

I have to build a Server who can handle multiple clients, and the client. I tried to build a single-connection-server/client, but both applications wait or sleep for the other side to react.

I hope anyone can help me with this. I have googled for tuts, but i can't seem to get the picture.

tl:dr gimme the source server/client-model java-code or help to create it myself.

We shouldnt recreate anger of the non-virtual world
DeathSpank
Profile Blog Joined February 2009
United States1029 Posts
June 01 2009 10:11 GMT
#2
fun! Sadly I'm of no use I've never touched server programming.
yes.
r3dox
Profile Blog Joined May 2003
Germany261 Posts
June 01 2009 10:44 GMT
#3
depends on how scalable it must be:
http://mina.apache.org/

also simple client/server examples should be everywhere around the net.
yenta
Profile Blog Joined April 2006
Poland1142 Posts
June 01 2009 10:45 GMT
#4
Learn ICE

http://www.zeroc.com/doc/Ice-3.3.1/manual/toc.html
Trutacz Practice Discord - https://discord.gg/PWF7Pv
wo0py
Profile Blog Joined July 2006
Netherlands922 Posts
June 02 2009 21:22 GMT
#5
Thank you all.. but i need to write the code for a server/client model in java programming. Not a server for files or mysql/php.
We shouldnt recreate anger of the non-virtual world
h3r1n6
Profile Blog Joined September 2007
Iceland2039 Posts
Last Edited: 2009-06-03 00:37:27
June 03 2009 00:36 GMT
#6
Have you tried the tutorials from sun? It's what I used to try it out, and it worked without a problem.

http://java.sun.com/docs/books/tutorial/networking/sockets/index.html
FreeZEternal
Profile Joined January 2003
Korea (South)3396 Posts
Last Edited: 2009-06-03 01:01:35
June 03 2009 00:55 GMT
#7
imo mina is overkill. Just go with a simple socket and serversocket implementation.

1 - Create a ServerSocket and bind it to a port number.
2 - Poll on the port. Polling is fine for single threads but if you need this to scale for a lot of connections, you will need java.nio and use selectors along with ServerSocketChannel.
3 - The client will probably use the Socket class and connect to your server. Use it's InputStream and OutputStream to receive and send messages.
Please log in or register to reply.
Live Events Refresh
Next event in 1h 36m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
ProTech130
Nina 119
Livibee 86
StarCraft: Brood War
Mind 1042
Killer 573
Pusan 459
Hm[arnc] 364
Stork 140
yabsab 39
Bale 32
NotJumperer 18
ZergMaN 18
ajuk12(nOOB) 9
[ Show more ]
Nal_rA 8
Icarus 7
Dota 2
monkeys_forever730
NeuroSwarm162
League of Legends
JimRising 701
Counter-Strike
Stewie2K1640
shoxiejesuss198
Other Games
summit1g6721
WinterStarcraft587
C9.Mang0434
Happy251
Sick233
Organizations
Other Games
gamesdonequick554
Dota 2
PGL Dota 2 - Main Stream121
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 14 non-featured ]
StarCraft 2
• Adnapsc2 10
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo849
• Stunt497
• TFBlade392
Upcoming Events
Replay Cast
1h 36m
Escore
2h 36m
INu's Battles
3h 36m
Classic vs ByuN
SHIN vs ByuN
OSC
5h 36m
Big Brain Bouts
8h 36m
Replay Cast
16h 36m
Replay Cast
1d 1h
RSL Revival
1d 2h
Classic vs GgMaChine
Rogue vs Maru
WardiTV Invitational
1d 3h
IPSL
1d 8h
Ret vs Art_Of_Turtle
Radley vs TBD
[ Show More ]
BSL
1d 11h
Replay Cast
1d 16h
RSL Revival
2 days
herO vs TriGGeR
NightMare vs Solar
uThermal 2v2 Circuit
2 days
BSL
2 days
IPSL
2 days
eOnzErG vs TBD
G5 vs Nesh
Patches Events
2 days
Replay Cast
3 days
Wardi Open
3 days
Afreeca Starleague
3 days
Jaedong vs Light
Monday Night Weeklies
3 days
Replay Cast
3 days
Sparkling Tuna Cup
4 days
Afreeca Starleague
4 days
Snow vs Flash
WardiTV Invitational
4 days
GSL
5 days
Classic vs Cure
Maru vs Rogue
GSL
6 days
SHIN vs Zoun
ByuN vs herO
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-04-29
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
Escore Tournament S2: W5
KK 2v2 League Season 1
StarCraft2 Community Team League 2026 Spring
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

Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
2026 GSL S2
RSL Revival: Season 5
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 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.