Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-01

Re: Acces violation????

4 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrey Kubyshev
to boci: I create a unit. It use the ssockets unit. I copied (but another name) from the fcl. I…

Hello boci,

Tuesday, January 09, 2001, 11:02:27 PM, you wrote:

boci> I create a unit. It use the ssockets unit. I copied (but another name) boci> from the fcl. I compile it, and want to use, but the program give this boci> output:
boci> something happened
boci> An unhandled exception occurred at 0x080680B9 : boci> Access violation

Please, FPC for linux is not yet ready for writing servers. I spent many time before came to this conclusion.

Best regards, Kubyshev Andrey
boci

I create a unit. It use the ssockets unit. I copied (but another name) from the fcl. I compile it, and want to use, but the program give this output:
something happened
An unhandled exception occurred at 0x080680B9 :
Access violation
0x080680B9
0x0807214C
0x0804847F
0x0804846C
0x00000000

And the unit:

unit Cow_Server;
interface
{$MODE objfpc}
uses
    ssockets;
type
    CowServer=class(TObject)
    private
	CS:TInetServer;
    public
	constructor Create(Port:longint);
	destructor Destroy;override;
	procedure OnConnect(Sender:TObject;Data:TSocketStream);
	procedure Start;
	procedure Stop;
    end;
implementation
    constructor CowServer.Create(Port:longint);
    begin
	CS:=TInetServer.Create(Port);
	;
    end;
    destructor CowServer.Destroy;
    begin
	CS.Free;
    end;
    procedure CowServer.OnConnect(Sender:TObject;Data:TSocketStream);
    begin
	writeln('Connected');
    end;
    procedure CowServer.Start;
    begin
	CS.StartAccepting;
    end;
    procedure CowServer.Stop;
    begin
	CS.StopAccepting;
    end;
end.

I don't know, what is the problem.
PLease Help!
Cow.

Georgi Georgiev

....

Please, FPC for linux is not yet ready for writing servers. I spent many time before came to this conclusion.

If you wont to write servers, you must use low
level networking functions (libc calls).

FPC for Linux can do these calls !

I'm writing FPC networking programs since 1998
and i have not any problems in this direction !

=====
Skelet
====== http://skelet.hit.bg

__________________________________________________ Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/