How do the server sockets and the sockets are bind in Java
Asked
Active
Viewed 404 times
-1
-
2Much like in C. See [Socket](http://download.oracle.com/javase/6/docs/api/java/net/Socket.html), et al. – Apr 15 '11 at 07:38
-
Have you looked at http://stackoverflow.com/questions/471342/java-socket-programming – forsvarir Apr 15 '11 at 07:41
-
Network programming is best learned via an introductory text, rather than hoping someone will come along with an excellent answer. If you just want to know how to drive _Java_, [this wikipedia page on Nio](http://en.wikipedia.org/wiki/New_I/O) may be useful. If you're completely new to sockets programming, [TCP/IP Illustrated Vol 1](http://www.powells.com/biblio/65-9780201633467-1) is an excellent starting point. (But old. Ignore all `T/TCP` TCP-transactions references. It never materialized. Also, I can't recall if it ever mentioned IPv6, but I can't imagine it covered it in enough depth.) – sarnold Apr 15 '11 at 07:42
-
Google is a better place to ask such questions. http://www.google.co.uk/search?q=How+do+the+server+sockets+and+the+sockets+are+bind+in+Java over 17 million results. – Peter Lawrey Apr 15 '11 at 07:46
-
Check out this tutorial, it is easy and compact: http://hippieitgeek.blogspot.se/2012/12/multi-threaded-network-programming-in.html – FidEliO Jan 11 '13 at 23:11
2 Answers
2
Please. There are about a gazillion sources on the Internet that show how to work with sockets. Start by looking at the Documentation for Socket
and ServerSocket
. If this doesn't help you have to get more specific.

musiKk
- 14,751
- 4
- 55
- 82
2
Maybe I misunderstand the question, but if you want to do Java socket programming, there is a decent tutorial and explanation of sockets in Java to be found at http://download.oracle.com/javase/tutorial/networking/sockets/

Pieter-Bas
- 354
- 1
- 3