Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #60501 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2013-11-26 22:38 +1100 |
| Last post | 2013-11-26 22:38 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: How to determine whether client and server are on the same host Chris Angelico <rosuav@gmail.com> - 2013-11-26 22:38 +1100
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-11-26 22:38 +1100 |
| Subject | Re: How to determine whether client and server are on the same host |
| Message-ID | <mailman.3228.1385465920.18130.python-list@python.org> |
On Tue, Nov 26, 2013 at 10:26 PM, Malte Forkel <malte.forkel@berlin.de> wrote: > Most of the application's functionality uses the telnet connection to > communicate with the server. One special operation is not available in > the protocol, but can be implemented by a direct file-based operation if > the application is run on the server itself. I would like to use that > option if technically feasible. There is another way you might be able to do this. The server could simply create a cookie in the file system - say, a file in /tmp with a randomly-generated name - and it can announce that to the client. If the client sees the same file in what it sees as /tmp, then it can assume that it's running on the server. Obviously there's a miniscule probability of an accidental collision, and someone could deliberately fool it, but for a simple check, that might work. ChrisA
Back to top | Article view | comp.lang.python
csiph-web