![]() |
Re: chat funktioniert nicht übers inet =(
Zitat:
|
Re: chat funktioniert nicht übers inet =(
Hinter dem Router sind aber mehrere PC's. Da ist meiner ja nicht genau bestimmt :(
|
Re: chat funktioniert nicht übers inet =(
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?
|
Re: chat funktioniert nicht übers inet =(
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; |
Re: chat funktioniert nicht übers inet =(
Hallo,
ich verwende die Indys. Ich schau mir das Routermenü nochmal genauer an. |
Re: chat funktioniert nicht übers inet =(
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 |
Re: chat funktioniert nicht übers inet =(
Leute, ihr seit OT - habt ihr den Thread mal gelesen worum es hier eigentlich geht :gruebel:
|
Re: chat funktioniert nicht übers inet =(
Hallo,
@Fiasko: Meinst du mich? Ich hab nochmal im Routermenü nachgeschaut, aber bin nicht weitergekommen. |
Re: chat funktioniert nicht übers inet =(
Ne ich meinte die anderen 2 Postings...
|
Re: chat funktioniert nicht übers inet =(
Der Server muss für jede Anfrage eines Client einen neuen Thread bilden:
![]() "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." |
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:46 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz