Register


Active : 1187
Logged in : 415
Time: 08:14 KST

User Streams
40 online (5 live)
Home | Forum | VODs | Liquibet | Fantasy | Blogs | Liquipedia | Articles | Store
Search TeamLiquid.net
Starcraft Progaming News
[OSL] Reach For The Stars
[TSL] Go Go Go!
[PL] Lim-Jin Rok
[TSL] Ladder with Legends
[OSL] The End of the Begi…
Featured Threads
Small Vod Thread.
TL User Locations
Recommended VODs of rece…
Funny Quotes from TL's I…
Team Liquid Manpower
General Forum
What cosmetic products d…
Marijuana in American Cu…
Participants needed for …
"Fall of the Republic"
Flash Forward (tv series)
Starcraft 2 Forum
Zerg spies?
Examining the Macro Mech…
StarCraft2.com updated!
Vote for SC2 in Spike's …
StarCraft II Q&A Batch 55
Starcraft: Brood War Forum
[CSL Cast] Riverside vs …
What's up with Nada?
Day[9].tv Daily
[Stream] KwarK
[Photos] Nate MSL Group …
Starcraft Tournaments and Leagues
[SPL] STX Soul vs Samsun…
[R&S] Nate MSL (Nov '09 …
3v3 BGH Random Races Tou…
[SPL] SK Telecom T1 vs W…
[MSL] Group Selection
Starcraft Strategy Forum
Why does destination fav…
[Guide] Map Analysis - F…
[Q] Gas Timings for 3Hat…
[H] ZvP 2 gates on outsi…
Liquipedia.net
Sports & Games Forum
League of Legends
2009-2010 football (socc…
[HoN/DotA] Let's Play~!!
modern warfare 2
Liquidation at GC! Lions…
Blogs
Starcraft Replays
Tempest)iS( - Stats
KawaiiRice - MistrZZZ
By.FlaSh - Best[WHITE]
By.FlaSh - Tempest)Is(
Light[aLive] - By.hero


Website Feedback

Closed Threads

IRC Updated
irc.quakenet.org #teamliquid

IRC Web Client
New to Team Liquid? Register here!

Java server/client

Forum index > Blogs
  wo0py   Netherlands. June 01 2009 18:39. Posts 770Profile Blog 
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
Old Post

  DeathSpank   United States. June 01 2009 19:11. Posts 673Profile Blog 
fun! Sadly I'm of no use I've never touched server programming.
yes.
Old Post

  r3dox   Germany. June 01 2009 19:44. Posts 141Profile Blog 
depends on how scalable it must be:
http://mina.apache.org/

also simple client/server examples should be everywhere around the net.
Old Post

  yenta   Poland. June 01 2009 19:45. Posts 625Profile Blog 
Learn ICE

http://www.zeroc.com/doc/Ice-3.3.1/manual/toc.html
ToT)mG.yentA(
Old Post

  wo0py   Netherlands. June 03 2009 06:22. Posts 770Profile Blog 
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
Old Post

  h3r1n6   Germany. June 03 2009 09:36. Posts 606Profile Blog 
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
Last edit: 2009-06-03 09:37:27
Old Post

  FreeZEternal   Korea (South). June 03 2009 09:55. Posts 3005Profile 
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.
Last edit: 2009-06-03 10:01:35
Old Post

 
Calendar
Mo Tu We Th Fr Sa Su
      1
2345678
9101112131415
16171819202122
23242526272829
30      

Live user streams:
iamtt1
KawaiiRice
skryoo1004
[ Show 2 non-featured ]

Upcoming events:  [ More ]
@13:00  [PL] STX vs KHAN
@13:00  [PL] hite vs MBC
Nov 23  [KDL] Week 1 Day 1
Team Liquid Progaming Database

League Standings:
» Shinhan 09-10 Proleague
» EVER 2009 OSL
PokerStrategy.com TSL Forum
TSL Ladder Standings
TSL Player Eligibility a…
TSL Ladder predictions
Official Raffle Entries
Become a fan of TSL!
Final Edits: Progaming Editorials
On The Shoulders of Giant…
Here To Stay
A Finale in Five
Masters of the Universe
Map of the Swarm
Power Rank: Progamer Rankings
1. Flash 6. Fantasy
2. Jaedong 7. Effort
3. Inter.Calm 8. Shine[Kal]
4. Stork[gm] 9. HyuK
5. Bisu 10. Kal
   Comments (304)
Poll
TSL Ladder #1?

Comments (133)      Older Polls


International Cyber Cup

Liquid Poker
Sitemap Contact Poker Forum

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2002-2009 Teamliquid.net. All Rights Reserved