You can call close()
from another thread, and the accept()
call will throw a SocketException
.
More Related Contents:
- Getting the ‘external’ IP address in Java
- Recommended way to get hostname in Java
- Why is it impossible, without attempting I/O, to detect that TCP socket was gracefully closed by peer?
- How to read all of Inputstream in Server Socket JAVA
- Netty vs Apache MINA
- Send HTTP request manually via socket
- Read remote file in java which needs username and password
- Safe use of HttpURLConnection
- java.net.URLEncoder.encode(String) is deprecated, what should I use instead?
- What would cause UDP packets to be dropped when being sent to localhost?
- Sending and receiving files on socket
- converting an IP address to host name
- Download file from HTTPS server using Java [duplicate]
- How to make a boolean variable turn true when called in a main method //Java
- How to get X and Y index of element inside GridLayout?
- Can I do a synchronous request with volley?
- Efficient way to do batch INSERTS with JDBC
- How to add row in JTable?
- Reliable File.renameTo() alternative on Windows?
- Converting JSON to XLS/CSV in Java [closed]
- Reading and displaying data from a .txt file
- google gson LinkedTreeMap class cast to myclass
- How to view the current heap size that an application is using?
- When to use primitive and when reference types in Java
- Java application profiling
- When and how to use hibernate second level cache?
- Illegal operation on empty result set [duplicate]
- @BeforeClass and inheritance – order of execution
- Random over ThreadLocalRandom
- How are the IV and authentication tag handled for “AES/GCM/NoPadding”?