摘要 |
PURPOSE: A method for setting up a socket connection is provided, so that each machine can simultaneously perform server/client functions with the socket connection in a client/server system. CONSTITUTION: A method for setting up a socket connection in a client/server system comprises the steps of: if a task operates with a listen mode, generating a socket to bind the socket with input/output port numbers having same numbers in all machines; entering a listen state to accept a connection request of an optional machine; if a task operates with a connection request mode, and if a machine has an application task for needing a connection with other machines, generating an optional socket; performing the connection request to a listen mode task of other side machine, by using a specific port designated by a port number on the listen mode task of the other side machine, which tries to connect the socket; receiving the performed connection request to generate the socket connection; and performing predetermined data transmitting operations between mutually-connected machines with the socket connection.
|