Autor Beitrag
NetZwerg
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 448

Slackware 10.1
Kylix 3, D5 Standard
BeitragVerfasst: So 29.08.04 07:53 
Hi,

ich habe mitm Indy einen Telnet-Server erstellt. Funktioniert auch ganz gut, allerdings kann ich mich nur einmal einloggen (sowohl parrallel, als auch hintereinander!). Dann muss ich den Server neu starten. Können sich trotzdem noch andere Leute einloggen? Und wie kann ich es so ändern, das ich mich nochmal einloggen kann??

Thx,
Dave :)

Edit: Habs eben mal vonnem anderen Computer ausprobiert. Also, es kann nur eine verbindung bestehen, aber wenn diese verbindung trennt kann sich niemand mehr verbinden, bis der server neu gestartet wird. Ich habe jetzt mal nicht im OnDisconnct Event, muss da was rein?

_________________
"Manche Leute drücken nur deshalb ein Auge zu, damit sie besser zielen können."
Billy Wilder, amer. Filmregisseur
NetZwerg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 448

Slackware 10.1
Kylix 3, D5 Standard
BeitragVerfasst: So 29.08.04 19:38 
weiß es niemand? oder hab'ich mich undeutlich ausgedrückt? :(

_________________
"Manche Leute drücken nur deshalb ein Auge zu, damit sie besser zielen können."
Billy Wilder, amer. Filmregisseur
NetZwerg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 448

Slackware 10.1
Kylix 3, D5 Standard
BeitragVerfasst: Fr 01.10.04 13:46 
Ich warte immernoch auf eine antwort :cry:

_________________
"Manche Leute drücken nur deshalb ein Auge zu, damit sie besser zielen können."
Billy Wilder, amer. Filmregisseur
doubleq
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Sa 02.10.04 11:02 
Hm - versteh ich irgendwie nicht ganz - also bei mir geht das. Hast Du Dich an der entsprechenden Demo von Indy orientiert? Das hab ich gemacht und hatte keine Probleme.
Wenn das nicht hilft, kannst Du vielleicht n bißchen Code posten...

Gruß DoubleQ
NetZwerg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 448

Slackware 10.1
Kylix 3, D5 Standard
BeitragVerfasst: So 03.10.04 17:17 
bei der indy demo funzts bei mir auch ich!?

hier mal der quellcode vom indy:

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
unit telnetsrvmain;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, IdBaseComponent, IdComponent, IdTCPServer, IdTelnetServer,
  IdAntiFreezeBase, IdAntiFreeze;

type
  TMainForm = class(TForm)
    IdTelnetServer1: TIdTelnetServer;
    IdAntiFreeze1: TIdAntiFreeze;
    buttonExit: TButton;
    Label1: TLabel;
    procedure IdTelnetServer1Authentication(AThread: TIdPeerThread;
      const AUsername, APassword: String; var AAuthenticated: Boolean);
    procedure IdTelnetServer1Execute(AThread: TIdPeerThread);
    procedure buttonExitClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  MainForm: TMainForm;

implementation

{$R *.DFM}

procedure TMainForm.IdTelnetServer1Authentication(AThread: TIdPeerThread;
  const AUsername, APassword: String; var AAuthenticated: Boolean);
begin
AAuthenticated:=True;
AThread.Connection.Write(AUsername);
AThread.Connection.WriteLn(', Welcome to Indy Telnet Server.');
AThread.Connection.WriteLn('You have new mail.');
AThread.Connection.WriteLn('');
end;

procedure TMainForm.IdTelnetServer1Execute(AThread: TIdPeerThread);
var
  str : string;
begin
 with AThread.Connection do
  begin
   Write('shell>');
   str:=InputLn('');
   if (str='exit') or (str='logout') then
      Disconnect;
   WriteLn(str);
  end;
end;

procedure TMainForm.buttonExitClick(Sender: TObject);
begin
 if IdTelnetServer1.Active=true then
 begin
   IdTelnetServer1.Active:=true
 end;
 Application.Terminate;
end;

end.

_________________
"Manche Leute drücken nur deshalb ein Auge zu, damit sie besser zielen können."
Billy Wilder, amer. Filmregisseur
doubleq
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Fr 08.10.04 14:18 
Was mir gerade kommt - kann es vielleicht sein, dass Dein Server eine Debugger-Exception auslöst??? Wenn ja, musst Du die natürlich erst mal wegklicken bevor der Server weiterläuft! Alternative: Server nicht in der Delphi-IDE starten sondern die Exe direkt ausführen oder die entsprechende Exception vom Debugger ignorieren lassen.

Gruß DoubleQ
NetZwerg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 448

Slackware 10.1
Kylix 3, D5 Standard
BeitragVerfasst: Fr 08.10.04 18:57 
Joa, stimmt der löst ne exception aus wenn ich verbinde (per telnet) und wenn ich die verbindung wieder schließe. macht er aber nicht wenn ich das programm einfach als exe ausführe.

Beim Verbinden:
Socket Error # 10035

Beim Trennen:
Connection Closed Gracefully

:?:

_________________
"Manche Leute drücken nur deshalb ein Auge zu, damit sie besser zielen können."
Billy Wilder, amer. Filmregisseur
NetZwerg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 448

Slackware 10.1
Kylix 3, D5 Standard
BeitragVerfasst: So 02.01.05 11:51 
:cry:

_________________
"Manche Leute drücken nur deshalb ein Auge zu, damit sie besser zielen können."
Billy Wilder, amer. Filmregisseur