Yazi Ekle
-
java
|
javax
|
org
java
>
java.net
>
java.net.datagramsocket
>
Class: java.net.DatagramSocket
java.lang.Object
java.net.DatagramSocket
public class
DatagramSocket
extends
Object
FIELDS:
CONSTRUCTORS:
public
DatagramSocket
()
protected
DatagramSocket
(
DatagramSocketImpl
impl)
public
DatagramSocket
(
SocketAddress
bindaddr)
public
DatagramSocket
(int port)
public
DatagramSocket
(int port,
InetAddress
laddr)
METHODS:
public
void
bind
(
SocketAddress
addr)
Throws:
SocketException
Throws:
SecurityException
Throws:
IllegalArgumentException
public
void
close
()
public
void
connect
(
InetAddress
address, int port)
Throws:
IllegalArgumentException
Throws:
SecurityException
public
void
connect
(
SocketAddress
addr)
Throws:
SocketException
Throws:
IllegalArgumentException
public
void
disconnect
()
public
boolean
getBroadcast
()
Throws:
SocketException
public
DatagramChannel
getChannel
()
public
InetAddress
getInetAddress
()
public
InetAddress
getLocalAddress
()
public
int
getLocalPort
()
public
SocketAddress
getLocalSocketAddress
()
public
int
getPort
()
public
int
getReceiveBufferSize
()
Throws:
SocketException
public
SocketAddress
getRemoteSocketAddress
()
public
boolean
getReuseAddress
()
Throws:
SocketException
public
int
getSendBufferSize
()
Throws:
SocketException
public
int
getSoTimeout
()
Throws:
SocketException
public
int
getTrafficClass
()
Throws:
SocketException
public
boolean
isBound
()
public
boolean
isClosed
()
public
boolean
isConnected
()
public
void
receive
(
DatagramPacket
p)
Throws:
IOException
Throws:
SocketTimeoutException
Throws:
PortUnreachableException
Throws:
IllegalBlockingModeException
public
void
send
(
DatagramPacket
p)
Throws:
IOException
Throws:
SecurityException
Throws:
PortUnreachableException
Throws:
IllegalBlockingModeException
public
void
setBroadcast
(boolean on)
Throws:
SocketException
public static
void
setDatagramSocketImplFactory
(
DatagramSocketImplFactory
fac)
Throws:
IOException
Throws:
SocketException
Throws:
SecurityException
public
void
setReceiveBufferSize
(int size)
Throws:
SocketException
Throws:
IllegalArgumentException
public
void
setReuseAddress
(boolean on)
Throws:
SocketException
public
void
setSendBufferSize
(int size)
Throws:
SocketException
Throws:
IllegalArgumentException
public
void
setSoTimeout
(int timeout)
Throws:
SocketException
public
void
setTrafficClass
(int tc)
Throws:
SocketException
INHERITED METHODS:
getClass()
,
hashCode()
,
equals(java.lang.Object)
,
clone()
,
toString()
,
notify()
,
notifyAll()
,
wait(long)
,
wait(long, int)
,
wait()
,
finalize()
,
SUBCLASSES:
MulticastSocket
,
Yazilar kaynak gosterilmeden kopyalanamaz © www.kodcu.net