How to use TclientSocket with thread

Hello

I want to make a client with TClientSocket and use a TClientSocketThread in blocking mode
I search a example because I don't know how to write  the thread and what are the arguments to pass to the thread?

Thank you

ClientSocket1->Address= Edit1->Text;
    ClientSocket1->Port=5025;
   
    ClientSocket1->Active = true;
 
      
   
    ReadThreadA = new TClientSocketThread(???????????);
 
   /* How can I  write the Thread ????????*/

Open in new window

bigbuffAsked:
Who is Participating?
 
George TokasConnect With a Mentor Commented:
>>If you don't have large amount of bytes in packets you will never have any problem...
Try it first client side without a thread...
USUALLY packets are small especially when using serial port....

George Tokas.
0
 
George TokasCommented:
Try first without a thread...
If you don't have large amount of bytes in packets you will never have any problem...

George Tokas.
0
 
bigbuffAuthor Commented:
I need a thread because my soft runs like a gatways :  the goal it's make a virtual serial port  sends and receives by way TCP/IP . I have an old software using Serial port and I want to use it via the net.
The program needs to send commands at any time to the server. The server at this moment make some
jobs (like connecting a serial port)

Mastok


0
 
bigbuffAuthor Commented:
Ok I ll try it.
Thank you
0
 
George TokasCommented:
Report when you have any results...
It was not needed to accept my proposal BEFORE you had results...

George Tokas.
0
All Courses

From novice to tech pro — start learning today.