Search found 263 matches

by mark_c
Tue Nov 12, 2013 10:54 am
Forum: Technical
Topic: Problem with memory
Replies: 19
Views: 76546

Re: Problem with memory

Thank you very much gambit47, I'm successfully using a ListView
by mark_c
Mon Nov 11, 2013 2:41 am
Forum: Technical
Topic: Problem with memory
Replies: 19
Views: 76546

Problem with memory

hello, I'm trying to put in BCB6.0 a StringGrid 1 million of path+file names with date and size but I get an error related to the memory. After 369,455 rows and 681,928 KB of memory consumed I get the message: Project1.exe raised exception class EoutOfMemory with message 'Out Of Memory' In task mana...
by mark_c
Fri Sep 27, 2013 1:38 am
Forum: Technical
Topic: Another problem using socket
Replies: 20
Views: 85859

Re: Another problem using socket

one more doubt. I've explained that TMyThread is derived from TServerClientThread and class TServerClientThread has only the event OnTerminate, it means that every instance of the class has only the event OnTerminate or other events? Ultimately logmsg () avoids situations of competition between thre...
by mark_c
Thu Sep 26, 2013 12:44 am
Forum: Technical
Topic: Another problem using socket
Replies: 20
Views: 85859

Re: Another problem using socket

sorry but, what's the difference if I use for example void __fastcall TForm1::ServerSocket1ClientConnect(TObject *Sender, TCustomWinSocket *Socket) { // a client connected and its thread is now running LogMsg("client connected"); } instead of void __fastcall TForm1::ServerSocket1ClientConnect(TObjec...
by mark_c
Wed Sep 25, 2013 1:10 pm
Forum: Technical
Topic: Another problem using socket
Replies: 20
Views: 85859

Re: Another problem using socket

hello,
I do not understand the usefulness of the function AllocateHWnd(&LogWndProc);


thanks
by mark_c
Sun Sep 22, 2013 3:32 am
Forum: Technical
Topic: Another problem using socket
Replies: 20
Views: 85859

Re: Another problem using socket

edit after some time i was able to run your code: thank you very much gambit47 //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; //-------------------------------------------------------------------------...
by mark_c
Wed Sep 18, 2013 12:27 pm
Forum: Technical
Topic: Another problem using socket
Replies: 20
Views: 85859

Re: Another problem using socket

thank you very much
by mark_c
Tue Sep 17, 2013 7:03 am
Forum: Technical
Topic: Another problem using socket
Replies: 20
Views: 85859

Re: Another problem using socket

thanks for your example that I find very articulate, but I'm again a student and beginner programmer. Your source code is a little difficult for me.

thanks again
by mark_c
Sun Sep 15, 2013 11:50 am
Forum: Technical
Topic: Another problem using socket
Replies: 20
Views: 85859

Re: Another problem using socket

hello, I decided to use blocking sockets and 1 thread for each client that connects to the server. To create threads, I'm used OnClientConnect the event in order to create one thread for each client and it seems to work, I can not explain, however, because after each thread created increases the spe...
by mark_c
Fri Sep 13, 2013 11:38 pm
Forum: Technical
Topic: Another problem using socket
Replies: 20
Views: 85859

Re: Another problem using socket

thanks for the reply, I'm using the CreateThread (http://msdn.microsoft.com/en-us/library ... p/ms682453 (v = vs.85). aspx), the class TServerClientThread I never used.

thanks
by mark_c
Thu Sep 12, 2013 11:07 pm
Forum: Technical
Topic: Another problem using socket
Replies: 20
Views: 85859

Re: Another problem using socket

Thanks for the reply, ultimately, this could be a solution to my problem? In the case of: ByteSend <strlen (message) , there is a Windows API that returns an error code? thanks again while(1) // forever { for(int byte=0; byte < 4000; byte++) { for(int bit=0; bit<8;bit++) { sprintf(msg"%d, %d, %d, %d...
by mark_c
Wed Sep 11, 2013 11:11 pm
Forum: Technical
Topic: Another problem using socket
Replies: 20
Views: 85859

Re: Another problem using socket

Hello, sorry if inherent to this point, but you're saying that setting ServerType property = "stThreadBlocking" all the checks I should do before sending packets to a client are "free"? And also that the thread that sends data is blocked until all the data has been sent to the client? Thank you very...
by mark_c
Wed Sep 11, 2013 1:16 am
Forum: Technical
Topic: Another problem using socket
Replies: 20
Views: 85859

Re: Another problem using socket

Good morning, in my previous question I forgot to mention that I'm using the ServerSocket component of BCB6. After reading your very clear reply I found that the property ServerType was set to stNonBlocking; with this setting using Putty I have many data loss. Then, I set the ServerType property = "...
by mark_c
Mon Sep 09, 2013 5:28 am
Forum: Technical
Topic: Another problem using socket
Replies: 20
Views: 85859

Another problem using socket

Hello everybody, I've a server code similar to: while(1) // forever { for(int byte=0; byte < 4000; byte++) { for(int bit=0; bit<8;bit++) { sprintf(msg"%s, %d, %d, %d %d, %d",byte,bit,c,d,e,f); SendSensorDataE(msg); } } Sleep(200); // wait 200 ms before send other messages } void SendSensorDataE(char...
by mark_c
Sun Mar 24, 2013 3:32 am
Forum: Technical
Topic: Borland Builder events
Replies: 9
Views: 39140

Re: Borland Builder events

sorry but, it is possible that BytesReceived < Size ?? if your answer at my question is yes, I think that the correct solution to be certain to capture all data received by a client every time is the following: AnsiString MyBuffer; // declared public for all functions void __fastcall TForm1::ServerS...