AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke Delphi chat funktioniert nicht übers inet =(
Thema durchsuchen
Ansicht
Themen-Optionen

chat funktioniert nicht übers inet =(

Ein Thema von alanblack · begonnen am 27. Jun 2004 · letzter Beitrag vom 4. Jul 2004
Antwort Antwort
Seite 4 von 5   « Erste     234 5      
Benutzerbild von fiasko
fiasko

Registriert seit: 10. Dez 2002
Ort: Dresden
506 Beiträge
 
#31

Re: chat funktioniert nicht übers inet =(

  Alt 1. Jul 2004, 14:28
Zitat von Spurius:
Im Router hab ich den benutzten Port geforwarded, was mach ich falsch?
Du sitzt also auch hinter'nem Router? Kannst du dir nicht von diesem direkt sagen lassen was seine oeffentliche IP-Adresse ist?
Thomas Liske
Posts comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
  Mit Zitat antworten Zitat
Spurius

Registriert seit: 19. Aug 2003
294 Beiträge
 
Delphi 7 Professional
 
#32

Re: chat funktioniert nicht übers inet =(

  Alt 1. Jul 2004, 15:30
Hinter dem Router sind aber mehrere PC's. Da ist meiner ja nicht genau bestimmt
  Mit Zitat antworten Zitat
Benutzerbild von fiasko
fiasko

Registriert seit: 10. Dez 2002
Ort: Dresden
506 Beiträge
 
#33

Re: chat funktioniert nicht übers inet =(

  Alt 1. Jul 2004, 20:16
Was ich meinte ist: ich schätze mal das ist ein Hardware-Router der über ne WWW-Seite oder sowas konfiguriert wird. Gibt es da nicht irgendwo die Info welche öffentliche IP er gerade bekommen hat?
Thomas Liske
Posts comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
  Mit Zitat antworten Zitat
Torsten Borstensohn

Registriert seit: 1. Jul 2004
Ort: Remscheid
8 Beiträge
 
Delphi 3 Professional
 
#34

Re: chat funktioniert nicht übers inet =(

  Alt 1. Jul 2004, 20:25
Ich denke, für jeden Client, der sich einloggen will, muss eine neue Winsock-Instanz gebildet werden, also so eine Art Array. Ich habe dazu in einem anderen Forum mal den Code gefunden. Leider kann ich heute die Quelle nicht mehr angeben.

procedure ...
var
i:integer;
sRec : string;
begin
for i := 0 to ServerSocket1.Socket.ActiveConnections-1 do
begin
with ServerSocket1.Socket.Connections[i] do
begin
sRec := ReceiveText;
if sRec <> '' then
begin
Memo1.Lines.Add(RemoteAddress + ' sends :') ;
Memo1.Lines.Add(sRecr);
end;
end;
end;
end;
  Mit Zitat antworten Zitat
Spurius

Registriert seit: 19. Aug 2003
294 Beiträge
 
Delphi 7 Professional
 
#35

Re: chat funktioniert nicht übers inet =(

  Alt 1. Jul 2004, 20:34
Hallo,
ich verwende die Indys. Ich schau mir das Routermenü nochmal genauer an.
  Mit Zitat antworten Zitat
Benutzerbild von Aenogym
Aenogym

Registriert seit: 7. Mär 2004
Ort: Schwerin
1.089 Beiträge
 
Delphi 7 Enterprise
 
#36

Re: chat funktioniert nicht übers inet =(

  Alt 1. Jul 2004, 20:44
Mal ein anderer Vorschlag: Die TDXPlay-Komponente aus der DelphiX-Sammlung!
Ich bin auch an normalen TCP-Komponenten gescheitert und greife nun zur DXPlay-Kompo.

Vorteile:
-Keine Client-/Server-Architektur (kann ggf. auch als Nachteil angesehen werden)
-Auf eingehende Daten kann in einem Event reagiert werden.
-Ganz einfache Handhabung

Nur so als Tipp

Aenogym
Steffen Rieke
Was nicht buzzt, wird buzzend gemacht!
http://blog.base-records.de
http://www.base-records.de
  Mit Zitat antworten Zitat
Benutzerbild von fiasko
fiasko

Registriert seit: 10. Dez 2002
Ort: Dresden
506 Beiträge
 
#37

Re: chat funktioniert nicht übers inet =(

  Alt 1. Jul 2004, 20:48
Leute, ihr seit OT - habt ihr den Thread mal gelesen worum es hier eigentlich geht
Thomas Liske
Posts comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
  Mit Zitat antworten Zitat
Spurius

Registriert seit: 19. Aug 2003
294 Beiträge
 
Delphi 7 Professional
 
#38

Re: chat funktioniert nicht übers inet =(

  Alt 2. Jul 2004, 11:32
Hallo,
@Fiasko: Meinst du mich?
Ich hab nochmal im Routermenü nachgeschaut, aber bin nicht weitergekommen.
  Mit Zitat antworten Zitat
Benutzerbild von fiasko
fiasko

Registriert seit: 10. Dez 2002
Ort: Dresden
506 Beiträge
 
#39

Re: chat funktioniert nicht übers inet =(

  Alt 2. Jul 2004, 11:40
Ne ich meinte die anderen 2 Postings...
Thomas Liske
Posts comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
  Mit Zitat antworten Zitat
Torsten Borstensohn

Registriert seit: 1. Jul 2004
Ort: Remscheid
8 Beiträge
 
Delphi 3 Professional
 
#40

Re: chat funktioniert nicht übers inet =(

  Alt 4. Jul 2004, 13:32
Der Server muss für jede Anfrage eines Client einen neuen Thread bilden:

http://www.howtodothings.com/showart...sp?article=522

"How do we handle more than one client requests at a time?

The answer is to spawn a new thread for each client request. This can be achieved by setting the ServerType property to stThreadBlocking. Does spawning and destroying a thread for each client request an overhead? Yes. Obviously. But if our application design requires it, then there is no other way; you have to have that overhead. Can we reduce that overhead of creating and destroying threads? Yes. We can. How? Cache those threads. Right.
The ThreadCacheSize property serves that purpose. The default value is 10 but this value depends on your client application needs. You should be very careful in setting this value. If you set it to a maximum value, you will end up in memory problems. If you set it to a very low value, the client will have a wait time for each request. So you have to determine a best value based on the client statistics.

If the client requests are coming one at a time, then you can set the ServerType property to stNonBlocking."
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 4 von 5   « Erste     234 5      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:13 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz