Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Java±à³ÌÄÇЩʶù102——ÍøÂç±à³Ì¼¼Êõ1

13.2.1 ÍøÂç±à³Ì²½Öè
         °´ÕÕÇ°ÃæµÄ»ù´¡ÖªÊ¶½éÉÜ£¬ÎÞÂÛʹÓÃTCP·½Ê½»¹ÊÇUDP·½Ê½½øÐÐÍøÂçͨѶ£¬ÍøÂç±à³Ì¶¼ÊÇÓÉ¿Í»§¶ËºÍ·þÎñÆ÷¶Ë×é³É¡£µ±È»£¬B/S½á¹¹µÄ±à³ÌÖÐÖ»ÐèҪʵÏÖ·þÎñÆ÷¶Ë¼´¿É¡£ËùÒÔ£¬ÏÂÃæ½éÉÜÍøÂç±à³ÌµÄ²½Öèʱ£¬¾ùÒÔC/S½á¹¹Îª»ù´¡½øÐнéÉÜ¡£
         ˵Ã÷£ºÕâÀïµÄ²½ÖèʵÏÖºÍÓïÑÔÎ޹أ¬Ò²¾ÍÊÇ˵£¬Õâ¸ö²½ÖèÊÊÓÃÓÚ¸÷ÖÖÓïÑÔʵÏÖ£¬²»¾ÖÏÞÓÚJavaÓïÑÔ¡£
13.2.1.1 ¿Í»§¶ËÍøÂç±à³Ì²½Öè
         ¿Í»§¶Ë(Client)ÊÇÖ¸ÍøÂç±à³ÌÖÐÊ×ÏÈ·¢ÆðÁ¬½ÓµÄ³ÌÐò£¬¿Í»§¶ËÒ»°ãʵÏÖ³ÌÐò½çÃæºÍ»ù±¾Âß¼­ÊµÏÖ£¬ÔÚ½øÐÐʵ¼ÊµÄ¿Í»§¶Ë±à³Ìʱ£¬ÎÞÂÛ¿Í»§¶Ë¸´ÔÓ»¹ÊǼòµ¥£¬ÒÔ¼°¿Í»§¶ËʵÏֵķ½Ê½£¬¿Í»§¶ËµÄ±à³ÌÖ÷ÒªÓÉÈý¸ö²½ÖèʵÏÖ£º
1¡¢  ½¨Á¢ÍøÂçÁ¬½Ó
¿Í»§¶ËÍøÂç±à³ÌµÄµÚÒ»²½¶¼Êǽ¨Á¢ÍøÂçÁ¬½Ó¡£ÔÚ½¨Á¢ÍøÂçÁ¬½ÓʱÐèÒªÖ¸¶¨Á¬½Óµ½µÄ·þÎñÆ÷µÄIPµØÖ·ºÍ¶Ë¿ÚºÅ£¬½¨Á¢Íê³ÉÒԺ󣬻áÐγÉÒ»ÌõÐéÄâµÄÁ¬½Ó£¬ºóÐøµÄ²Ù×÷¾Í¿ÉÒÔͨ¹ý¸ÃÁ¬½ÓʵÏÖÊý¾Ý½»»»ÁË¡£
2¡¢  ½»»»Êý¾Ý
Á¬½Ó½¨Á¢ÒԺ󣬾ͿÉÒÔͨ¹ýÕâ¸öÁ¬½Ó½»»»Êý¾ÝÁË¡£½»»»Êý¾ÝÑϸñ°´ÕÕÇëÇóÏìӦģÐͽøÐУ¬ÓÉ¿Í»§¶Ë·¢ËÍÒ»¸öÇëÇóÊý¾Ýµ½·þÎñÆ÷£¬·þÎñÆ÷·´À¡Ò»¸öÏìÓ¦Êý¾Ý¸ø¿Í»§¶Ë£¬Èç¹û¿Í»§¶Ë²»·¢ËÍÇëÇóÔò·þÎñÆ÷¶Ë¾Í²»ÏìÓ¦¡£
¸ù¾ÝÂß¼­ÐèÒª£¬¿ÉÒÔ¶à´Î½»»»Êý¾Ý£¬µ«ÊÇ»¹ÊDZØÐë×ñÑ­ÇëÇóÏìӦģÐÍ¡£
3¡¢  ¹Ø±ÕÍøÂçÁ¬½Ó
ÔÚÊý¾Ý½»»»Íê³ÉÒԺ󣬹رÕÍøÂçÁ¬½Ó£¬ÊͷųÌÐòÕ¼ÓõĶ˿ڡ¢ÄÚ´æµÈϵͳ×ÊÔ´£¬½áÊøÍøÂç±à³Ì¡£
         ×î»ù±¾µÄ²½ÖèÒ»°ã¶¼ÊÇÕâÈý¸ö²½Ö裬ÔÚʵ¼ÊʵÏÖʱ£¬²½Öè2»á³öÏÖÖظ´£¬ÔÚ½øÐдúÂë×é֯ʱ£¬ÓÉÓÚÍøÂç±à³ÌÊDZȽϺÄʱµÄ²Ù×÷£¬ËùÒÔÒ»°ã¿ªÆôרÃŵÄÏÖ³¡½øÐÐÍøÂçͨѶ¡£
13.2.1.2 ·þÎñÆ÷¶ËÍøÂç±à³Ì²½Öè
         ·þÎñÆ÷¶Ë(Server)ÊÇÖ¸ÔÚÍøÂç±à³ÌÖỶ¯µÈ´ýÁ¬½ÓµÄ³ÌÐò£¬·þÎñÆ÷¶ËÒ»°ãʵÏÖ³ÌÐòµÄºËÐÄÂß¼­ÒÔ¼°Êý¾Ý´æ´¢µÈºËÐŦÄÜ¡£·þÎñÆ÷¶ËµÄ±à³Ì²½ÖèºÍ¿Í»§¶Ë²»Í¬£¬ÊÇÓÉËĸö²½ÖèʵÏÖ£¬ÒÀ´ÎÊÇ£º
1¡¢  ¼àÌý¶Ë¿Ú
·þÎñÆ÷¶ËÊôÓÚ±»¶¯µÈ´ýÁ¬½Ó£¬ËùÒÔ·þÎñÆ÷¶ËÆô¶¯ÒԺ󣬲»ÐèÒª·¢ÆðÁ¬½Ó£¬¶øÖ»ÐèÒª¼àÌý±¾µØ¼ÆËã»úµÄij¸ö¹Ì¶¨¶Ë¿Ú¼´¿É¡£
Õâ¸ö¶Ë¿Ú¾ÍÊÇ·þÎñÆ÷¶Ë¿ª·Å¸ø¿Í»§¶ËµÄ¶Ë¿Ú£¬·þÎñÆ÷¶Ë³ÌÐòÔËÐеı¾µØ¼ÆËã»úµÄIPµØÖ·¾ÍÊÇ·þÎñÆ÷¶Ë³ÌÐòµÄIPµØÖ·¡£
2¡¢  »ñµÃÁ¬½Ó
µ±¿Í»§¶ËÁ¬½Óµ½·þÎñÆ÷¶Ëʱ£¬·þÎñÆ÷¶Ë¾Í¿ÉÒ


Ïà¹ØÎĵµ£º

java »º´æ¿ò¼Üjava caching systemʹÓÃʾÀý

  ҪʹÓÃjava caching system£¬ÐèÒªÏÂÃæÕ⼸¸ö°ü£ºjcs.jar£¬concurrent.jar,commons-logging.jar, commons-lang.jar,commons-collection.jarÕ⼸¸ö°ü£¬ÔÚjava¹¤³ÌÀïÃ棬
Ê×ÏÈн¨Ò»¸öʹÓÃjcsµÄÅäÖÃÎļþ£ºcache.ccf£¬ÎļþÃû²»Äܸġ£
# DEFAULT CACHE REGION
# sets the default aux value for any non configured ca ......

Java iText ¶¯Ì¬ Éú³É PDF Îĵµ ±í¸ñ ÖÐÎÄÎÊÌâ

import java.awt.Color;
import java.io.FileOutputStream;
import com.lowagie.text.Cell;
import com.lowagie.text.Chapter;
import com.lowagie.text.Document;
import com.lowagie.text.Font;
import com.lowagie.text.Image;
import com.lowagie.text.List;
import com.lowagie.text.ListItem;
import com.lo ......

Java Network Game Programming

game
server responsibility:
Initialize
the server socke;

Wait
for a client to connect;

Accept
the client connection;

Create
a daemon thread to support the clien;

Go
back to step 2.

game daemon responsibility:
Accept
client player connection;

Pair ......

java¸´ÖÆ£¬¼ôÇУ¬É¾³ýÎļþ²Ù×÷

package OALogic.sql.data;
import java.io.*;
public class FileOperate {
   public FileOperate() {
   }
  
   public static void main(String args[]){
       newFolder("D:/100");
   }
   /**
  ......

javaÖеķ´Éä»úÖÆ

Ò»¡¢Ê²Ã´ÊÇ·´É䣺
·´ÉäµÄ¸ÅÄîÊÇÓÉSmithÔÚ1982ÄêÊ×´ÎÌá³öµÄ£¬Ö÷ÒªÊÇÖ¸³ÌÐò¿ÉÒÔ·ÃÎÊ¡¢¼ì²âºÍÐÞ¸ÄËü±¾Éí״̬»òÐÐΪµÄÒ»ÖÖÄÜÁ¦¡£ÕâÒ»¸ÅÄîµÄÌá³öºÜ¿ìÒý·¢Á˼ÆËã»ú¿ÆѧÁìÓò¹ØÓÚÓ¦Ó÷´ÉäÐÔµÄÑо¿¡£ËüÊ×Ïȱ»³ÌÐòÓïÑÔµÄÉè¼ÆÁìÓòËù²ÉÓÃ,²¢ÔÚLispºÍÃæÏò¶ÔÏó·½ÃæÈ¡µÃÁ˳ɼ¨¡£ÆäÖÐLEAD/LEAD++ ¡¢OpenC++ ¡¢MetaXaºÍOpenJavaµÈ¾ÍÊÇ»ùÓÚ·´ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ