|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
java.lang.Objectjava.net.SocketImpl
public abstract class SocketImpl
Ãß»ó Ŭ·¡½º SocketImpl´Â
¼ÒÄÏÀ» ½ÇÁ¦·Î ±¸ÇöÇÏ´Â ¸ðµç Ŭ·¡½º¿¡ °øÅëÀÇ ½´ÆÛ Ŭ·¡½ºÀÔ´Ï´Ù. Ŭ¶óÀÌ¾ðÆ® ¼ÒÄϰú ¼¹ö ¼ÒÄÏÀÇ ¾çÂÊ ¸ðµÎ¸¦ ÀÛ¼ºÇÒ ¶§¿¡ »ç¿ëµË´Ï´Ù.
¡¸ÇÁ·¹ÀÎÀΡ¹¼ÒÄÏÀº °¢ ¸Þ¼µå¸¦ ±â¼ú´ë·Î ±¸ÇöÇÕ´Ï´Ù. ¹æÈº®(fire wall)³ª ÇÁ·Ï½Ã´Â »ç¿ëÇÏÁö ¾Ê½À´Ï´Ù.
| ÇÊµå °³¿ä | |
|---|---|
protected InetAddress |
address
ÀÌ ¼ÒÄÏÀÇ ¿ø°ÝÃø ÀÇ IP ÁÖ¼ÒÀÔ´Ï´Ù. |
protected FileDescriptor |
fd
ÀÌ ¼ÒÄÏÀÇ ÆÄÀÏ ±â¼úÀÚ °´Ã¼ÀÔ´Ï´Ù. |
protected int |
localport
ÀÌ ¼ÒÄÏÀÇ Á¢¼ÓóÀÇ ·ÎÄà Æ÷Æ® ¹øÈ£ÀÔ´Ï´Ù. |
protected int |
port
ÀÌ ¼ÒÄÏÀÇ Á¢¼ÓóÀÇ ¸®¸ðÆ® È£½ºÆ®»ó¿¡ ÀÖ´Â Æ÷Æ® ¹øÈ£ÀÔ´Ï´Ù. |
| ÀÎÅÍÆäÀ̽º java.net. SocketOptions ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå |
|---|
IP_MULTICAST_IF,
IP_MULTICAST_IF2,
IP_MULTICAST_LOOP,
IP_TOS,
SO_BINDADDR,
SO_BROADCAST,
SO_KEEPALIVE,
SO_LINGER,
SO_OOBINLINE,
SO_RCVBUF,
SO_REUSEADDR,
SO_SNDBUF,
SO_TIMEOUT,
TCP_NODELAY |
| »ý¼ºÀÚ °³¿ä | |
|---|---|
SocketImpl ()
|
|
| ¸Þ¼µå °³¿ä | |
|---|---|
protected abstract void |
accept (SocketImpl s)
Á¢¼ÓÀ» ¹Þ¾ÆµéÀÔ´Ï´Ù. |
protected abstract int |
available ()
ÀÌ ¼ÒÄÏÀ¸·ÎºÎÅÍ ºí·Ï¾øÀÌ Àо ¼ö ÀÖ´Â ¹ÙÀÌÆ®¼ö¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
protected abstract void |
bind (InetAddress host,
int port)
ÀÌ ¼ÒÄÏÀÌ ÁöÁ¤µÈ ·ÎÄà IP ÁÖ¼Ò¿Í Æ÷Æ® ¹øÈ£¿¡ ¹ÙÀεå ÇÕ´Ï´Ù. |
protected abstract void |
close ()
ÀÌ ¼ÒÄÏÀ» ´Ý½À´Ï´Ù. |
protected abstract void |
connect (InetAddress address,
int port)
ÁöÁ¤µÈ È£½ºÆ®»óÀÇ ÁöÁ¤µÈ Æ÷Æ®¿¡ ÀÌ ¼ÒÄÏÀ» Á¢¼ÓÇÕ´Ï´Ù. |
protected abstract void |
connect (SocketAddress address,
int timeout)
ÁöÁ¤µÈ È£½ºÆ®ÀÇ ÁöÁ¤µÈ Æ÷Æ® ¹øÈ£¿¡ ÀÌ ¼ÒÄÏÀ» Á¢¼ÓÇÕ´Ï´Ù. |
protected abstract void |
connect (String host,
int port)
ÁöÁ¤µÈ È£½ºÆ®»óÀÇ ÁöÁ¤µÈ Æ÷Æ®¿¡ ÀÌ ¼ÒÄÏÀ» Á¢¼ÓÇÕ´Ï´Ù. |
protected abstract void |
create (boolean stream)
½ºÆ®¸² ¼ÒÄÏ ¶Ç´Â µ¥ÀÌÅÍ ±×·¥ ¼ÒÄÏÀ» ÀÛ¼ºÇÕ´Ï´Ù. |
protected FileDescriptor |
getFileDescriptor ()
ÀÌ ¼ÒÄÏÀÇ fd Çʵ尪À» ¸®ÅÏÇÕ´Ï´Ù. |
protected InetAddress |
getInetAddress ()
ÀÌ ¼ÒÄÏÀÇ address Çʵ尪À» ¸®ÅÏÇÕ´Ï´Ù. |
protected abstract InputStream |
getInputStream ()
ÀÌ ¼ÒÄÏÀÇ ÀÔ·Â ½ºÆ®¸²À» ¸®ÅÏÇÕ´Ï´Ù. |
protected int |
getLocalPort ()
ÀÌ ¼ÒÄÏÀÇ localport Çʵ尪À» ¸®ÅÏÇÕ´Ï´Ù. |
protected abstract OutputStream |
getOutputStream ()
ÀÌ ¼ÒÄÏÀÇ Ãâ·Â ½ºÆ®¸²À» ¸®ÅÏÇÕ´Ï´Ù. |
protected int |
getPort ()
ÀÌ ¼ÒÄÏÀÇ port Çʵ尪À» ¸®ÅÏÇÕ´Ï´Ù. |
protected abstract void |
listen (int backlog)
¼ö½ÅÇÏ´Â Á¢¼Ó (Á¢¼Ó ¿ä±¸)À» ³Ö´Â Å¥ÀÇ ÃÖ´ëÀåÀ» countÀμöÀÇ °ªÀ¸·Î ¼³Á¤ÇÕ´Ï´Ù. |
protected abstract void |
sendUrgentData (int data)
¼ÒÄÏ»óÀÇ 1 ¹ÙÀÌÆ®ÀÇ ±ä±Þ µ¥ÀÌÅ͸¦ ¼Û½ÅÇÕ´Ï´Ù. |
protected void |
setPerformancePreferences (int connectionTime,
int latency,
int bandwidth)
ÀÌ ¼ÒÄÏÀÇ ÆÛÆ÷¸Õ½º ¼³Á¤À» ½Ç½ÃÇÕ´Ï´Ù. |
protected void |
shutdownInput ()
ÀÌ ¼ÒÄÏÀÇ ÀÔ·Â ½ºÆ®¸²À» ¡¸½ºÆ®¸²ÀÇ ÃÖÈÄ¡¹¿¡ ¹èÄ¡ÇÕ´Ï´Ù. |
protected void |
shutdownOutput ()
ÀÌ ¼ÒÄÏÀÇ Ãâ·Â ½ºÆ®¸²À» ¹«È¿·Î ÇÕ´Ï´Ù. |
protected boolean |
supportsUrgentData ()
ÀÌ SocketImpl°¡ ±ä±Þ µ¥ÀÌÅÍÀÇ ¼Û½ÅÀ» Áö¿ø Çϰí ÀÖÀ»Áö ¾î¶³Áö¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
String |
toString ()
ÀÌ ¼ÒÄÏÀÇ ÁÖ¼Ò¿Í Æ÷Æ®¸¦ String·Î
¼ ¸®ÅÏÇÕ´Ï´Ù. |
| Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
|---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| ÀÎÅÍÆäÀ̽º java.net. SocketOptions ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
|---|
getOption,
setOption |
| ÇʵåÀÇ »ó¼¼ |
|---|
protected FileDescriptor fd
protected InetAddress address
protected int port
protected int localport
| »ý¼ºÀÚ »ó¼¼ |
|---|
public SocketImpl()
| ¸Þ¼µåÀÇ »ó¼¼ |
|---|
protected abstract void create(boolean stream)
throws IOException
stream - true¸¦ ÁöÁ¤ÇßÀ» °æ¿ì´Â ½ºÆ®¸² ¼ÒÄÏÀÌ ÀÛ¼ºµÇ¾î ±×·¸Áö ¾ÊÀº °æ¿ì´Â µ¥ÀÌÅÍ ±×·¥ ¼ÒÄÏÀÌ ÀÛ¼ºµÈ´Ù
IOException - ¼ÒÄÏÀÇ ÀÛ¼ºÁß¿¡ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
protected abstract void connect(String host,
int port)
throws IOException
host - ¸®¸ðÆ® È£½ºÆ®¸íport - Æ÷Æ® ¹øÈ£
IOException - ¸®¸ðÆ® È£½ºÆ®¿¡°Ô·ÎÀÇ Á¢¼ÓÁß¿¡ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
protected abstract void connect(InetAddress address,
int port)
throws IOException
address - ¸®¸ðÆ® È£½ºÆ®ÀÇ IP ÁÖ¼Òport - Æ÷Æ® ¹øÈ£
IOException - Á¢¼ÓÀÇ ½ÃÇàÁß¿¡ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
protected abstract void connect(SocketAddress address,
int timeout)
throws IOException
address - ¸®¸ðÆ® È£½ºÆ®ÀÇ ¼ÒÄÏ ÁÖ¼Òtimeout - ŸÀÓ ¾Æ¿ôÄ¡ (¹Ð¸® ¼¼ÄÁµå). ŸÀÓ ¾Æ¿ô ¾øÀ½ÀÇ °æ¿ì´Â 0
IOException - Á¢¼ÓÀÇ ½ÃÇàÁß¿¡ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
protected abstract void bind(InetAddress host,
int port)
throws IOException
host - ·ÎÄà ÀÎÅÍÆäÀ̽º¿¡ ¼Ò¼ÓÇÏ´Â IP ÁÖ¼Òport - Æ÷Æ® ¹øÈ£
IOException - ÀÌ ¼ÒÄÏÀ» ¹ÙÀεå ÇÒ °æ¿ì¿¡ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
protected abstract void listen(int backlog)
throws IOException
countÀμöÀÇ °ªÀ¸·Î ¼³Á¤ÇÕ´Ï´Ù. Å¥°¡ ¸Þ¿öÁö°í ÀÖÀ» ¶§ Á¢¼Ó ¿ä±¸°¡ ÀÖÀ¸¸é, Á¢¼ÓÀº °ÅºÎµË´Ï´Ù.
backlog - Å¥ÀÇ ÃÖ´ëÀå
IOException - Å¥ÀÇ ÀÛ¼ºÁß¿¡ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
protected abstract void accept(SocketImpl s)
throws IOException
s - ¹Þ¾ÆµéÀÌ´Â Á¢¼Ó
IOException - Á¢¼ÓÀÇ ¼ö¶ôÁß¿¡ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
protected abstract InputStream getInputStream()
throws IOException
IOException - ÀÔ·Â ½ºÆ®¸²ÀÇ ÀÛ¼ºÁß¿¡ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
protected abstract OutputStream getOutputStream()
throws IOException
IOException - Ãâ·Â ½ºÆ®¸²ÀÇ ÀÛ¼ºÁß¿¡ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
protected abstract int available()
throws IOException
IOException - ÀÌ¿ëÇÒ ¼ö ÀÖ´Â ¹ÙÀÌÆ®¼öÀÇ °áÁ¤½Ã¿¡ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
protected abstract void close()
throws IOException
IOException - ÀÌ ¼ÒÄÏÀ» ´ÝÀ» ¶§ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
protected void shutdownInput()
throws IOException
IOException - ÀÌ ¼ÒÄÏÀ» Á¤ÁöÇÒ °æ¿ì¿¡ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìSocket.shutdownOutput(),
Socket.close(),
Socket.setSoLinger(boolean, int)
protected void shutdownOutput()
throws IOException
IOException - ÀÌ ¼ÒÄÏÀ» Á¤ÁöÇÒ °æ¿ì¿¡ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìSocket.shutdownInput(),
Socket.close(),
Socket.setSoLinger(boolean, int) protected FileDescriptor getFileDescriptor()
fd Çʵ尪À» ¸®ÅÏÇÕ´Ï´Ù.
fd Çʵ尪fd protected InetAddress getInetAddress()
address Çʵ尪À» ¸®ÅÏÇÕ´Ï´Ù.
address Çʵ尪address protected int getPort()
port Çʵ尪À» ¸®ÅÏÇÕ´Ï´Ù.
port Çʵ尪port protected boolean supportsUrgentData()
address
protected abstract void sendUrgentData(int data)
throws IOException
data - ¼Û½ÅÇÏ´Â µ¥ÀÌÅÍÀÇ ¹ÙÀÌÆ®
IOException - µ¥ÀÌÅ͸¦ ¼Û½ÅÇÒ °æ¿ì¿¡ ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìprotected int getLocalPort()
localport Çʵ尪À» ¸®ÅÏÇÕ´Ï´Ù.
localport Çʵ尪localport public String toString()
String·Î
¼ ¸®ÅÏÇÕ´Ï´Ù.
Object ³»ÀÇ toString
protected void setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)
¼ÒÄÏÀº µðÆúÆ®·Î TCP/IP ÇÁ·ÎÅäÄÝÀ» »ç¿ëÇÕ´Ï´Ù. ±¸Çö¿¡ µû¶ó¼´Â TCP/IP¿Í´Â ´Ù¸¥ ÆÛÆ÷¸Õ½º Ư¼ºÀ» °¡Áö´Â ´ëü ÇÁ·ÎÅäÄÝÀÌ Á¦°øµÇ´Â Àϵµ ÀÖ½À´Ï´Ù. ¾îÇø®ÄÉÀ̼ÇÀº ÀÌ ¸Þ¼µå¸¦ »ç¿ëÇÏ´Â °ÍÀ¸·Î ±¸ÇöÀ¸·Î ÀÌ¿ë °¡´ÉÇÑ ÇÁ·ÎÅäÄÝÀÇ ¼±Åýÿ¡ ÀÌ·¯ÇÑ ±ÕÇüÀÇ ÃëÇÏ´Â ¹æ¹ýÀ» ³ªÅ¸³»´Â µ¶ÀÚÀûÀÎ ¼³Á¤À» Ç¥ÇöÇÒ ¼ö ÀÖ½À´Ï´Ù.
ÆÛÆ÷¸Õ½º ¼³Á¤Àº Á¢¼Ó ½Ã°£ÀÇ ÂªÀ½, ÀÀ´ä ½Ã°£ÀÇ ¼Óµµ, ´ë¿ªÆøÀÇ ³ÐÀÌÀÇ »ó´ëÀûÀÎ Á߿䵵¸¦ ³ªÅ¸³»´Â 3°³ÀÇ Á¤¼ö°ª¿¡ ÀÇÇØ ±â¼úµË´Ï´Ù. Á¤¼öÀÇ Àý´ëÄ¡¿¡ °ü°è¼ºÀº ¾ø°í, ÇÁ·ÎÅäÄÝÀ» ¼±ÅÃÇϱâ À§Çؼ °ªÀ» ´ÜÁö ºñ±³ÇÕ´Ï´Ù. °ªÀÌ Å©¸éº¸´Ù °ÇÑ ¼³Á¤À» ³ªÅ¸³À´Ï´Ù. À߸øµÈ °ªÀº Á¤ÀÇ °ªº¸´Ù ¿ì¼± ¼øÀ§°¡ ³·Àº ÀÏÀ» ³ªÅ¸³À´Ï´Ù. ¾îÇø®ÄÉÀ̼ÇÀÌ ÀÀ´ä ½Ã°£ÀÇ ¼Óµµ¿Í ´ë¿ªÆøÀÇ ³ÐÀ̺¸´Ù Á¢¼Ó ½Ã°£ÀÇ ÂªÀ½À» ¿ì¼±ÇÏ´Â °æ¿ì, ÀÌ ¸Þ¼µå¸¦ (1, 0, 0) À̶ó°í ÇÏ´Â °ªÀ¸·Î È£ÃâÇÒ ¼ö ÀÖ½À´Ï´Ù . ¾îÇø®ÄÉÀ̼ÇÀÌ ÀÀ´ä ½Ã°£ÀÇ ¼Óµµº¸´Ù ´ë¿ªÆøÀÇ ³ÐÀ̸¦, ¶Ç Á¢¼Ó ½Ã°£ÀÇ ÂªÀ½º¸´Ù ÀÀ´ä ½Ã°£ÀÇ ¼Óµµ¸¦ ¿ì¼±ÇÏ´Â °æ¿ì, ÀÌ ¸Þ¼µå¸¦ (0, 1, 2) À̶ó°í ÇÏ´Â °ªÀ¸·Î È£ÃâÇÒ ¼ö ÀÖ½À´Ï´Ù . µðÆúÆ®¿¡¼´Â ¼ºê Ŭ·¡½º¿¡¼ ¿À¹ö¶óÀ̵å(override)µÇ¾î ÀÖÁö ¾ÊÀº ÇÑ, ÀÌ ¸Þ¼µå´Â ¾Æ¹«°Íµµ ½Ç½ÃÇÏÁö ¾Ê½À´Ï´Ù.
connectionTime - Á¢¼Ó ½Ã°£ÀÇ ÂªÀ½ÀÇ »ó´ëÀûÀÎ Á߿䵵¸¦ ³ªÅ¸³»´Â intlatency - ÀÀ´ä ½Ã°£ÀÇ ¼ÓµµÀÇ »ó´ëÀûÀÎ Á߿䵵¸¦ ³ªÅ¸³»´Â intbandwidth - ´ë¿ªÆøÀÇ ³ÐÀÌÀÇ »ó´ëÀûÀÎ Á߿䵵¸¦ ³ªÅ¸³»´Â int
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.