Opening Sockets on localhost
revdan at danshafer.com
Tue Mar 15 22:45:48 CST 2005
I got it. IOW, opening a socket doesn't work unilaterally. The "server"
has to have a listener on that port first. Right?
I'm going to figure out this server stuff one of these days.
On Mar 15, 2005, at 5:05 PM, Alex Tweedly wrote:
> Dan Shafer wrote:
>> If I open socket to "localhost" and look at the result, it's empty,
>> which means the socket got created. If I subsequently use close
>> socket "localhost", that works, too. If, before I close the socket I
>> try to open it again, I get the expected error indicating the socket
>> is already open. So far, so good.
>> However, if I append a port to the open socket command, nothing
>> happens. open socket to "localhost:8080" followed immediately by
>> "cloe socket "localhost:8080" returns "socket is not open."
>> OS X 10.3.8, Rev 2.5.1.
>> Is this broken or am I misunderstanding something or...???
> Possibly neither.
> open socket "localhost" is equivalent to open socket
> the default port is 80, which is generally used for HTTP connections.
> This should succeed if your machine is able (willing) to accept http
> connections, and otherwise it should fail. Sounds like it succeeds on
> your machine.
> open socket "localhost:8080" should fail, unless you have some
> process on your machine accepting connections on port 8080 - fairly
> unlikely, so I'd expect it to fail.
> Alex Tweedly http://www.tweedly.net
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 15/03/2005
> use-revolution mailing list
> use-revolution at lists.runrev.com
More information about the use-livecode