Benjamin L. Russell wrote:
[...]
If you have a crash, then it is definitely a problem of networking permissions. If not, then it is probably an Emacs problem.

Running file1.oz (ranamed to File1.oz) at first resulted in the
following error message:

[...]
Adding an `end' to the end of the file then resulted in the following
error message:

[...]
Since I was unable to obtain a port number from the output from
running File1.oz, I was unable to run File2.oz (renamed from
"file2.oz").

I shouldn't have sent code without first testing it. Here is a corrected (and tested) version:
File1.oz:
local S P in
  thread
     S={New Open.socket server(port:P)}
  end
  {Wait P}
  {Show P}
  {Show {S read(list:$)}}
  {S close()}
  {Show ok}
  {Delay 5000}
end

File2.oz:
local S P in
  P=1234 %Replace with port number given by running File1.oz
  S={New Open.socket client(port:P)}
  {S write(vs:"\n")}
  {S close()}
  {Show ok}
  {Delay 5000}
end
I have already experienced TCP/IP port-related errors in Windows XP
Professional, Service Pack 2, related to auto-updating another
application, DrScheme, because of this problem; unfortunately, when I
tried to add TCP/IP port permissions to that application through the
Control Panel -> Windows Security Center -> Windows Firewall ->
Exceptions -> Add Port... feature, this function did not seem to work.
I suspect that if Mozart/Oz uses a TCP/IP channel for inter-process
communication, then this could be the cause of the error.

Which TCP/IP port number should be added?
As far as I can tell from MSDN, Windows can pick any port number between 1024 and 5000.
-- Benjamin L. Russell
Yves
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to