Hello!
I have written the following small application:
functor
import
OS
Application
System
define
MySock = {OS.socket 'PF_INET' 'SOCK_STREAM' ""}
Csock
in
%try
{OS.bind MySock 60028}
{OS.listen MySock 3}
Csock = {OS.accept MySock _ _ }
{System.print Csock}
{OS.send Csock "Hallo Welt!" nil 5}
{System.printInfo "Ende"}
{OS.close Csock}
%catch _ then
{Application.exit 1}
%end
end
When i compile and execute the pickle and connect via telnet to the
specific port, i receive the following errormessage on the console:
$ ozengine ts.ozf
464
%***************************** failure **************************
%**
%** In statement: {OS.send 464
72|97|108|108|111|32|87|101|108|116|,,,|,,, nil _
<optimized>}
%**
%** Call Stack:
%** procedure in file "./ts.oz", line 1, column 0, PC = 45286040
%** procedure 'RootManager,Pickle/fast' in file
"/src1/dragan/usr/mozart/share/l
ib/init/Module.oz", line 252, column 6, PC = 44933152
%** procedure in file
"/src1/dragan/usr/mozart/share/lib/init/Module.oz", line 7
4, column 3, PC = 45125432
%**--------------------------------------------------------------
Debugging didn't revealed anything. However, the string is enirely
written to the client (and not as specified only 5 bytes) and the
application receives a catchable exception.
Where is the mistake?
Thanks for your assistance,
Johann
-
Please send submissions to users@mozart-oz.org
and administriva mail to users-request@mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.