aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes simple socket question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "simple socket question" Watch "simple socket question" New topic
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
    
  19

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
    
  19

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: simple socket question
 
Similar Threads
NIO non-blocking newbie
simple socket programming
reading from TCP socket problem
Singleton/Static in Multi threading scenario
Successful Applet Socket Connection