It would be helpful if you were to elaborate on what your concern is as your question is somewhat vague. I might also suggest that LQ Servers isn't the best place for this type of (programming) question and you will likely get a much better response in either a PHP programming forum or even the Software forum.
From a conceptual standpoint, for a socket based, client - server, application you would need two processes to simultaneously be operating. One would be the server and would listen for connections and the other would be the client that establishes the connection with the server. Writing such an application set would probably be EASIER in separate FILES, but wouldn't necessarily have to be on separate MACHINES. In order to write it both a client and a server in one program, you would probably need to fork off a process and have it determine if it is the parent or child.
|