Thread View: borland.public.cppbuilder.internet.socket
3 messages
3 total messages
Started by Patryk B.
Thu, 06 Sep 2007 10:35
[TURBO C++] TcpServer
Author: Patryk B.
Date: Thu, 06 Sep 2007 10:35
Date: Thu, 06 Sep 2007 10:35
19 lines
1288 bytes
1288 bytes
Hello,
Can anyone can help me with TcpServer component and bmThreadBlocking? How
to make it work?
I know that i need to creaty my class, like:
void __fastcall TMyServerThread::ClientExecute(void)
{
...
}
I dont know what to write in GetThread event.
I tryed to use http://dn.codegear.com/article/26276
but its about ServerSocket.
Best Regards
Patryk.
Re: [TURBO C++] TcpServer
Author: Patryk B.
Date: Thu, 06 Sep 2007 15:07
Date: Thu, 06 Sep 2007 15:07
21 lines
1623 bytes
1623 bytes
Hi,
I used ServerSocket component and did everythink like i article -
http://dn.codegear.com/article/26276
If you understood good every new connection should start new thread.
But when im traying to connect to my server using telnet, nothing happend.
I can connect, but thats all. I cant recive and send any message.
I put ShowMessage("test") at the begin of fuctions:
TMyServerThread::ClientExecute
ServerSocket1GetThread
to know that that functions are executed - and no, the message dont appear.
What am i doing wrong.
Thanks for any help and sorry for my english.
Best regards.
Patryk.
Re: [TURBO C++] TcpServer
Author: Remy Lebeau (TeamB)
Date: Thu, 06 Sep 2007 17:37
Date: Thu, 06 Sep 2007 17:37
33 lines
2025 bytes
2025 bytes
"Patryk B." <pbobak@no.spam.o2.pl> wrote in message news:op.tx8adhbrwzezly@dune.intranet... > Can anyone can help me with TcpServer component > and bmThreadBlocking? I do not suggest using TTcpServer (or TTcpClient) at all. They are very poorly implemented. They were Borland's attempt are cross-platform socket components, but they were designed to a very low common demoninator that makes the components harder, not easier, to use. I strongly suggest you use a different component. You can either continue to use TServerSocket if you don't need to support Linux (you can install the dclsocket...bpl package to re-install it) or else use a third-party component, such as from Indy, ICS, or Synapse. > How to make it work? Don't use threading at all. TTcpServer will handle its own threading internally. Simply do your work inside the server's OnAccept event. > I know that i need to creaty my class, like: You are going about it all wrong. That approach applies only to TServerSocket, not to TTcpServer at all. > I tryed to use http://dn.codegear.com/article/26276 > but its about ServerSocket. That article does not apply in this situation at all. Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads