All Categories
 
DatagramSocket SetSendBufferSize() Example

DatagramSocketclass SetSendBufferSize() method example. This example shows you how to use SetSendBufferSize() method.This method Sets the SO_SNDBUF option to the specified value for this DatagramSocket.

 
DatagramSocket SetReuseAddress() Example

DatagramSocketclass SetReuseAddress() method example. This example shows you how to use SetReuseAddress() method.This method Enable/disable the SO_REUSEADDR socket option.

 
DatagramSocket SetReceiveBufferSize() Example

DatagramSocketclass SetReceiveBufferSize() method example. This example shows you how to use SetReceiveBufferSize() method.This method Sets the SO_RCVBUF option to the specified value for this DatagramSocket.

 
DatagramSocket SetBroadcast() Example

DatagramSocketclass SetBroadcast() method example. This example shows you how to use SetBroadcast() method.This method Enable/disable SO_BROADCAST.

 
DatagramSocket IsConnected() Example

DatagramSocketclass IsConnected() method example. This example shows you how to use IsConnected() method.This method Returns the connection state of the socket.

 
DatagramSocket isClosed() Example

DatagramSocketclass isClosed() method example. This example shows you how to use isClosed() method.This method Returns whether the socket is closed or not.

 
DatagramSocket IsBound() Example

DatagramSocketclass IsBound() method example. This example shows you how to use IsBound() method.This method Returns the binding state of the socket.

 
DatagramSocket GetTrafficClass() Example

DatagramSocketclass GetTrafficClass() method example. This example shows you how to use GetTrafficClass() method.This method Gets traffic class or type-of-service in the IP datagram header for packets sent from this DatagramSocket.

 
Socket isConnected Example

Socket class isConnected example. public boolean isConnected() Returns the connection state of the socket.

 
DatagramSocket GetSoTimeout() Example

DatagramSocketclass GetSoTimeout() method example. This example shows you how to use GetSoTimeout() method.This method Retrieve setting for SO_TIMEOUT.

 
DatagramSocket GetSendBufferSize() Example

DatagramSocketclass GetSendBufferSize() method example. This example shows you how to use GetSendBufferSize() method.This method Get value of the SO_SNDBUF option for this DatagramSocket, that is the buffer size used by the platform for output on this DatagramSocket.

 
Socket isClosed Example

Socket class isClosed example. public boolean isClosed() Returns the closed state of the socket.

 
DatagramSocket GetReuseAddress() Example

DatagramSocketclass GetReuseAddress() method example. This example shows you how to use GetReuseAddress() method.This method Tests if SO_REUSEADDR is enabled.

 
Socket isBound Example

Socket class isBound example. public boolean isBound() Returns the binding state of the socket.

 
DatagramSocket GetRemoteSocketAddress() Example

DatagramSocketclass GetRemoteSocketAddress() method example. This example shows you how to use GetRemoteSocketAddress() method.This method Returns a SocketAddress representing the remote endpoint of this socket, or null if it is not connected yet.

 
DatagramSocket GetReceiveBufferSize() Example

DatagramSocketclass GetReceiveBufferSize() method example. This example shows you how to use GetReceiveBufferSize() method.This method Returns the value of the SO_RCVBUF option for this DatagramSocket

 
Socket getTrafficClass Example

Socket class getTrafficClass example. public int getTrafficClass() throws SocketException Gets traffic class or type-of-service in the IP header for packets sent from this Socket As the underlying network implementation may ignore the traffic class or type-of-service set using setTrafficClass(int) this method may return a different value than was previously set using the setTrafficClass(int) method on this Socket.

 
DatagramSocket GetPort() Example

DatagramSocketclass GetPort() method example. This example shows you how to use GetPort() method.This metho Returns the port for this socket.

 
DatagramSocket GetLocalSocketAddress() Example

DatagramSocketclass GetLocalSocketAddress() method example. This example shows you how to use GetLocalSocketAddress() method.This method Returns the address of the endpoint this socket is bound to, or null if it is not bound yet.

 
DatagramSocket GetLocalPort() Example

DatagramSocketclass GetLocalPort() method example. This example shows you how to use GetLocalPort() method.This method Returns the port number on the local host to which this socket is bound.

 
Socket getTcpNoDelay Example

Socket class getTcpNoDelay example. public boolean getTcpNoDelay() throws SocketException Tests if TCP_NODELAY is enabled.

 
DatagramSocket GetLocalAddress() Example

DatagramSocketclass GetLocalAddress() method example. This example shows you how to use GetLocalAddress() method.This method Gets the local address to which the socket is bound.

 
Socket getSoTimeout Example

Socket class getSoTimeout example. public int getSoTimeout() throws SocketException Returns setting for SO_TIMEOUT. 0 returns implies that the option is disabled (i.e., timeout of infinity).

 
DatagramSocket getInetAddress() Example

DatagramSocketclass getInetAddress() method example. This example shows you how to use getInetAddress() method.This method Returns the address to which this socket is connected.Here is the code:-

 
Socket getSoLinger Example

Socket class getSoLinger example. public int getSoLinger() throws SocketException Returns setting for SO_LINGER. -1 returns implies that the option is disabled. The setting only affects socket close.

 
Socket getSendBufferSize Example

Socket class getSendBufferSize example. public int getSendBufferSize() throws SocketException Get value of the SO_SNDBUF option for this Socket, that is the buffer size used by the platform for output on this Socket.

 
DatagramSocket GetBroadcast() Example

DatagramSocketclass GetBroadcast() method example. This example shows you how to use GetBroadcast() method.This method Tests if SO_BROADCAST is enabled.

 
Socket getReuseAddress Example

Socket class getReuseAddress example. public boolean getReuseAddress() throws SocketException Tests if SO_REUSEADDR is enabled.

 
DatagramSocket Disconnect() Example

DatagramSocketclass Disconnect() method example. This example shows you how to use Disconnect() method.This method Disconnects the socket.

 
DatagramSocket Connect1() Example

DatagramSocketclass Connect1() method example. This example shows you how to use Connect1() method.This method Connects this socket to a remote socket address (IP address + port number).

 
 1    2    3    4    5    6    7    8    9    10    11    12   [13]    14    15    16    17    18    19    20    21    22    23    24    25    26    27    28    29    30    31    32    33    34    35    36    37    38    39    40    41    42    43    44    45    46    47    48    49    50    51    52    53    54    55    56    57    58    59    60    61    62    63    64    65    66    67    68    69    70    71    72    73    74    75    76    77    78    79    80    81    82    83    84    85    86    87    88    89    90    91    92    93    94    95    96    97    98    99    100    101    102    103    104    105    106    107    108    109    110    111    112    113    114    115    116    117    118    119    120    121    122    123    124    125    126    127    128    129    130    131    132    133    134    135    136    137    138    139    140    141    142    143    144    145    146    147    148    149    150    151    152    153    154    155    156    157    158    159    160    161    162    163    164    165    166    167    168    169    170    171    172    173    174    175    176    177    178    179    180    181    182    183    184    185    186    187    188    189    190    191    192    193    194    195    196    197    198    199    200    201    202    203    204    205    206    207    208    209    210    211    212    213    214    215    216    217    218    219    220    221    222    223    224    225    226    227    228    229    230    231    232    233    234    235    236    237    238    239    240    241    242    243    244    245    246    247    248    249    250    251    252    253    254    255    256    257    258    259    260    261    262    263    264    265    266    267    268    269    270    271    272    273    274    275    276    277    278    279    280    281    282    283    284    285    286    287    288    289    290    291    292    293    294    295    296    297    298    299    300    301    302    303    304    305    306    307    308    309    310    311    312    313    314    315    316    317    318    319    320    321    322    323    324    325    326    327    328    329    330    331    332    333    334    335    336    337    338    339    340    341    342    343    344    345    346    347    348    349    350    351    352    353    354    355    356    357    358    359    360    361    362    363    364    365    366    367    368    369    370    371    372    373    374    375    376    377    378    379    380    381    382    383    384    385    386    387    388    389    390    391    392    393    394    395    396    397    398    399    400    401    402    403    404    405    406    407    408    409    410    411    412    413    414    415    416    417    418    419    420    421    422    423    424    425    426    427    428    429    430    431    432    433    434    435    436    437    438    439    440  
 
 
 
 
 

HOME | COPYRIGHT | CONTACT US