Hi François,

I'm not reinventing the wheel. I saw your samples programs about TWSocketServer too. My problem not is work with various instances of clients. My problem is when the client connect the server, the server redirect the connection to another application. I have the Socket.Accept, I run another application, in this another application who I do establish connection with the client ? It's possible ?

The server only receive connections in a determinete IP/port, if have a connection, it redirect this connection to another application e return to listen.

The computer where the server is running, have something the service server, after receive a connection, have the service server and another application serving the client connection (P2P, but not in instance the same project of service server). This another application, only have one connection to the client, if disconnect, the application terminate. Not listen another connections.

Resuming, client connect to server, server execute another application. The another application establishing the connection e work with the client. Have a sample about this ?

Arnoldo

----- Original Message ----- From: "Francois PIETTE" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Friday, May 20, 2005 1:04 PM
Subject: Re: [twsocket] Telnet



But the question 1, OnSessionAvailable on server, I execute this code
below:

You are reinventing the wheel.
Use TWSocketServer instead of TWSocket. It has everything needed to accept
incomming connections and manage client list. If you really want to reinvent
the wheel, have a look at TWSocketServer source code.


Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
The author for the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be



----- Original Message ----- From: "Arnoldo - Optextil" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Friday, May 20, 2005 4:24 PM
Subject: Re: [twsocket] Telnet



François,

About Question 2, Ok ! I saw the source code of EmulVT, thanks...

But the question 1, OnSessionAvailable on server, I execute this code
below:

Don't forgot uses shellapi;

procedure TForm1.SrvSocketSessionAvailable(Sender: TObject; ErrCode:
Word);
var
ClientFileName, ClientParams, ClientDir : array [0..255] of char;
NewHSocket : TSocket;
begin
NewHSocket := SrvSocket.Accept;
Caption := Inttostr(newhsocket);
StrPCopy(@ClientFileName, 'c:\atual\project2.exe');
StrPCopy(@ClientParams, ''+ inttostr(newhsocket));
StrPCopy(@ClientDir, 'c:\atual\');
ShellExecute(Application.Handle, 'open', @ClientFileName, @ClientParams,
@ClientDir, SW_SHOW);
end;


in the client application, I establish the connection reading the
parameters...

This is a bad example to perform this operation ! In your sample programs,
you establish the connection in the same project, the application have a
form client.


Execute a client to receive a connection is necessary, because if I
execute
two or more clients in the same project, the operations executed by
clients
not can execute in the same time. A client waiting for another client, do
you understand ? This restriction don't is
required by communication, but the application that emulated... This
application access old routines with sharing memory  and I don't have
access
to source code.

If you have a idea about this, i like it ! A code example about establish
conection in another application  is very good ! :)

Thanks

Arnoldo


----- Original Message ----- From: "Francois Piette" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Friday, May 20, 2005 4:47 AM
Subject: Re: [twsocket] Telnet



>> I'm using ICS - TWSocket and I wrote a server that listen on port,
>> waiting a
>> connection. A client telnet connect to this IP/port and the server
>> execute
>> another application to receive this connection. The server is a single
>> receive of connections.
>>
>> Question 1 = Did you already make something similar ? If you made >> this,
>> please send-me a example !!! :)
>
> I'm not sure I understand "execute another application to receive this
> connection".
> There are several sample programs that accept TCP connections. See the
> project group delivered with
> ICS.
>
>
>> Question 2 = Do you have anything documentation about emuling terminal
>> VT100/VT220 ? I can send to the client telnet commands to position
>> cursor,
>> make a frame, etc... Do you know this functions ? I saw your sample
about
>> emuling terminal, server/client.
>
> You'll find all (well most) function in the EmulVT  component which
decode
> all those escape
> sequences for rendering on screen.
> You'll find plenty documentation by searching with google for "ansi
escape
> sequences" (without
> double quotes).
>
>
> --
> [EMAIL PROTECTED]
> http://www.overbyte.be
>
>
> -- > To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>




--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be




-- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be

Reply via email to