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

JavaÍøÂç±à³Ìѧϰ±Ê¼ÇÖ®Socket(Ò»)

    ÔÚ¿Í»§/·þÎñÆ÷ͨÐÅģʽÖУ¬¿Í»§¶ËÖ÷¶¯´´½¨Óë·þÎñÆ÷Á¬½ÓµÄSocket£¬·þÎñÆ÷ÊÕµ½¿Í»§¶ËµÄÁ¬½ÓÇëÇó£¬Ò²´´½¨ÁËÓë¿Í»§¶ËÁ¬½ÓµÄSocket¡£
    ¿Í»§¶ËÖ÷¶¯´´½¨Socketʱºò£¬ÐèÒª×öÏÂÃæһЩÊÂÇ飺
    1. ¹¹ÔìSocket.
    2. É趨µÈ´ý½¨Á¢Á¬½ÓµÄ³¬Ê±Ê±¼ä
    3. É趨·þÎñÆ÷µÄµØÖ·
    4. É趨¿Í»§¶ËµÄµØÖ·
    5. ´¦Àí¿Í»§¶ËÁ¬½Ó·þÎñÆ÷¿ÉÄÜÅ׳öµÄÒì³£
    SocketµÄÐÅÏ¢ÓÐÔ¶³Ì·þÎñÆ÷µÄIPµØÖ·¡¢¶Ë¿ÚºÅ£¬¿Í»§±¾µØµÄIPµØÖ·¡¢¶Ë¿ÚºÅ£¬ÊäÈëÁ÷ºÍÊä³öÁ÷¡£
    ÈçºÎÅжϿͻ§¶Ë½ø³Ì·¢ËÍÊý¾ÝÍê³É£¬Socket¹Ø±ÕµÄ´¦Àí·½·¨£º
    1.Ô¼¶¨Ò»¸ö½áÊøµÄ×Ö·û´®£¬±ÈÈç“exit”µÈ¡£
    2.¿Í»§¶Ë½ø³ÌÏÈ·¢ËÍÒ»¸öÏûÏ¢£¬°üº¬ÕýÎĵij¤¶È£¬·þÎñÆ÷½ø³Ì¶Áµ½Õâ¸ö³¤¶Èºó£¬¾ÍÈÏΪ½áÊø¡£
    3.¿Í»§¶Ë½ø³Ì·¢ÍêËùÓÐÊý¾Ý£¬¹Ø±Õ¡£Èç¶Áµ½-1
    ÁíÍâSocketÓаë¹Ø±ÕµÄ˵·¨£¬¾ÍÊǹرÕÊä³öÁ÷»òÊäÈëÁ÷Ö®Ò»¡£±ÈÈç½ø³ÌA¹Ø±ÕÁËÊäÈëÁ÷£¬Ôò²»ÔÊÐíÊä³öÊý¾Ý£¬µ«ÈÔ¿ÉÒÔ¶ÁÈëÊý¾Ý¡£µ«ÕâÈÔÐèÒªµ÷ÓÃclose·½·¨£¬ÕâÑù²ÅÄÜÊÍ·ÅSocketÕ¼ÓõÄ×ÊÔ´¡£
    SocketÓкܶàµÄÑ¡Ïî
TCP_NODELAY:±íʾÁ¢¼´·¢ËÍÊý¾Ý
SO_RESUSEADDR:±íʾʮ·ÖÔÊÐíÖØÓÃSocketËù°ó¶¨µÄ±¾µØµØÖ·
SO_TIMEOUT:±íʾ½ÓÊÜÊý¾ÝʱµÄµÈ´ý³¬Ê±Ê±¼ä
SO_LINGER:±íʾµ±Ö´ÐÐSocketµÄclose()·½·¨Ê±£¬ÊÇ·ñÁ¢¼´¹Ø±Õµ×²ãµÄSocket
SO_SNFBUF£º·¢ËÍÊý¾ÝµÄ»º³åÇø´óС
SO_RCVBUF:½ÓÊÕÊý¾ÝµÄ»º³åÇø´óС
SO_KEEPALIVE:¶ÔÓÚ³¤Ê±¼ä´¦ÓÚ¿ÕÏÐ״̬µÄSocket£¬ÊÇ·ñ×Ô¶¯°ÑËü¹Ø±Õ
OOBINLINE:±íʾÊÇ·ñÖ§³Ö·¢ËÍÒ»¸ö×Ö½ÚµÄTCP½ô¼±Êý¾Ý
    ½ÓÏÂÀ´¶ÔÉÏÃæÑ¡ÏîÒ»Ò»½âÊÍ.
   


Ïà¹ØÎĵµ£º

JAVA JNI

http://blog.csdn.net/hbcui1984/archive/2009/12/10/4980805.aspx
Ò»¡¢¸ÅÊö
JNI(java native interface)£¬JAVA±¾µØ½Ó¿Úµ÷Óã¬Ä¿µÄÊÇΪÁËJAVA¿ÉÒÔµ÷Óñ¾µØ³ÌÐò£¬Ö÷ÒªÓŵãÓУº
Ìá¸ßЧÂÊ£¬½â¾öÐÔÄÜÎÊÌâ
·ÀÖ¹·´±àÒ룬Ìá¸ßºËÐÄ´úÂ밲ȫÐÔ
ÔöÇ¿±¾»ú½Ó¿Úµ÷ÓÃ
ǶÈëʽ¿ª·¢Ó¦ÓÃ
    ÈçÏÂͨ¹ýÒ»¸ö×î¼òµ¥µÄÐ ......

JavaÀûÓÃxml½«´óÅúÁ¿Êý¾Ýµ¼³öµ½excelµÄÒ»¸ö·½·¨

±ÊÕßÔÚJava¿ª·¢Öг£³£»áÓöµ½½«Êý¾Ý¿âÊý¾Ýµ¼³öµ½ExcelµÄÒªÇ󣬱ÈÈçÔÚÎÒµÄÒ»¸öÏîÄ¿ÖУ¬¿Í»§ÒªÇóËùÓвéѯ½á¹û¶¼¿ÉÒÔµ¼³öµ½Excel£¬¶ÔÓÚÊý¾ÝÁ¿²»´óµÄ£¨¼¸ÍòÌõ£©£¬Õâ±È½ÏÈÝÒ×ʵÏÖ£¬µ«¶ÔÓÚÊý¾ÝÁ¿±È½Ï´óµÄ£¨¼¸Ê®Íò¼°ÒÔÉÏ£¬¾ßÌåÒª¿´µ¼³öÄÚÈݵÄ×ֶθöÊýºÍ³¤¶Ì£©£¬ÔòÔÚÊý¾Ý¿â²éѯºÍÉú³ÉexcelÎļþÉ϶¼»áÓÐÂé·³¡£
ÒÔÎÒÔÚʵ¼ÊÏîÄ¿ÖеÄÒ»¸ ......

javaѧϰ±Ê¼Ç 1.³õ²½½éÉÜ

Ò».javaÈý¸ö·½Ïò
j2se ×ÀÃ濪·¢  £¨»ù´¡£©
j2ee web¿ª·¢
j2me ÊÖ»ú¿ª·¢
¶þ.¿ª·¢¹¤¾ß
¼Çʱ¾
jcreator
jbuilder
netbean
elipse£¨IBM£©
......
Èý.javaÓïÑÔÌصã
¼òµ¥
ÃæÏò¶ÔÏó
¿çƽ̨£¨Ò»´Î±àÒ룬µ½´¦ÔËÐУ©
¸ßÐÔÄÜ
ËÄ.°²×°ºÍÅäÖÃjdk
jdk£¿
java development kit java¿ª·¢¹¤¾ß°ü
°üÀ¨£ºjre£¨javaÔËÐ ......

java¶à線³ÌµÄ實Àý

import javax.swing.*;
import java.awt.BorderLayout;
import java.awt.Graphics;
import java.awt.event.*;
public class ThreadDemo extends JFrame {
/**
*
*/
private static final long serialVersionUID = 1L;
public ThreadDemo() {
JButton btn = new JButton("Click me");
btn.addActionL ......

ѧÁËjava¼¸¸öÔºó

ÎÒºÜϲ»¶Ñ§Ï°java£¬ÄÇÊÇÔÚÎÒÕýʽÉÏÁËÕâ¸ö¿Îºó¾Íϲ»¶ÉÏÁË£¬ÎÒ¾õµÃÎÒѧµÄÖ»ÊÇÒ»°ã£¬µ«ÊÇÎÒÏë°ÑÎÒµÄһЩ¸öÈ˾­ÑéдÏÂÀ´£¬ºÇºÇ¡£¡£¡£¡£¡£
javaÊÇÃæÏò¶ÔÏóµÄ±à³ÌÓïÑÔ£¬ÎÒÒÔÇ°Ö»Êdzõ²½Ñ§Ï°¹ýc£¬Ñ§Ï°javaʱһЩ»ù±¾µÄÓï·¨Ö»ÊÇ¿´ÁË¿´£¬ÒòΪºÍcÊDz¶àµÄ£¬µ«ÊǺóÀ´²»¶ÏµØѧϰ·¢ÏÖ¡£Ñ§Ï°javaÒªºÃºÃÊìϤ¸÷ÖÖ¸÷ÑùµÄÀֻ࣬Ҫ½«¸÷ÖÖÀàÊì ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ