| Author |
simple socket question
|
abalfazl hossein
Ranch Hand
Joined: Sep 06, 2007
Posts: 602
|
|
The object that is returned by accept(), Is an instance of socket class in client ?
or socket class in server?
|
 |
Henry Wong
author
Sheriff
Joined: Sep 28, 2004
Posts: 16695
|
|
abalfazl hossein wrote:
The object that is returned by accept(), Is an instance of socket class in client ?
or socket class in server?
Not exactly sure what you are asking here... a socket instance represents an endpoint of the network connection. So the socket at the server and client are the opposite endpoints to the same connection. Please elaborate what you are asking.
Henry
|
Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
|
 |
abalfazl hossein
Ranch Hand
Joined: Sep 06, 2007
Posts: 602
|
|
|
OK. Then a connection is established . The socket object that is returned by the accept method, Is that object is created in server or client?
|
 |
Henry Wong
author
Sheriff
Joined: Sep 28, 2004
Posts: 16695
|
|
abalfazl hossein wrote:The socket object that is returned by the accept method, Is that object is created in server or client?
Oh, I see. The object is created locally. There is no serialization taking place.
Remember that the socket mechanism calls the underlying socket mechanism, implemented by the operating system -- and operating systems are, for the most part, not object oriented.
Henry
|
 |
 |
|
|
subject: simple socket question
|
|
|