Home > Back-end >  JDK built-in class can be serialized?
JDK built-in class can be serialized?

Time:01-18

JDK built-in class can be serialized? (such as sockets, ObjectOutputStream)
Can the server to a user of a socket to another user, so it can be normal use?
Can't two clients have what method can not directly communicate through a server?

CodePudding user response:

Can't, these objects are related to environment, even if can serialize transmission, deserialized back because the environment is not used, the different, for example, an environment without the proxy, another environment have a proxy, an environmental output wrote d dish, another environment without d disk, and so on, so the environment related objects are generally cannot be serialized,
After the server link two clients don't think so, then two client socket links on yourself,

CodePudding user response:

reference 1st floor qybao response:
no, these objects are related to environment, even if can serialize transmission, deserialized back because the environment is not used, the different, for example, an environment without the proxy, another environment have a proxy, an environmental output wrote d dish, another environment without d disk, and so on, so the environment related objects are generally cannot be serialized,
After the server link two clients don't think so, then two client socket links on yourself,
user is not in the same local area network (LAN), and have no public still can connect?

CodePudding user response:

That not line,
Can the client IP mapped to routing can be public access, if the condition permits, otherwise can only through the server
  • Related