|
do you have an exmple of doing that ??
I am newbie on the socket connection ....
thanks
|
|
|
|
|
You just need to call socket , bind , listen , accept and recv in that order.
|
|
|
|
|
sugarandcream wrote: do you have an exmple of doing that ??
Have a look at Beej's guide to networking programming[^], there are client/server examples in chapter 6.
Another starting point is the Winsock Programmer's FAQ[^], it has examples in section 6.
Regarding your original post, the data should be sent (nearly immediately) to the listening socket. The delay you describe is very likely on the server side, perhaps your server implementation waits for something.
Hope it helps
|
|
|
|
|
Hi everione,
I'm trying to use Hans Dietrich XCrashReport, but in my console application, whet heap corruption occurs, exception handling funcion is unable to call
GetModuleFileName() or, if I skip this part, CreateFile() function.
I'm using VS2005
Is this compiler/linker parameter I'm miss, or the problem is calling of system functions in exception handler?
|
|
|
|
|
I don't understand if you describe a compile-time or runtime error.
Do you have details? Have you tried contacting the author?
Cheers
|
|
|
|
|
There is the situation:
at run-time an exception occur: let's say memcpy with negative pozition in destination buffer. e.g. memcpy(&buff[negative_index], ...)
off-course, __except will catch this and run exceptionhandler function
in this function is a call for GetModuleFileName() and OS at this point report that is unable to process call because of heap corruption!
I'm moved this call to main application, making an global variable, but in second try, same heppens but in call of CreateFile(), but this function must be right there to open exception log file for writing.
My question is: which functions are preferred or allowed in exception handling. These two functions are system ones. exception handler haven't problem with memcpy, strcat etc to prepare exception log file name. But CreateFile() (or some sort of fopen) is essential part of any exception logging.
|
|
|
|
|
I am unable to reproduce your problem, I have no problem calling GetModuleFileName() or CreateFile() from within my exception handler. Avoid C runtime library[^] functions and call only system functions, e.g. Kernel32.lib User32.lib.
/M
|
|
|
|
|
Hi Guys,
I want to store info into Mysql and retrieve back into console application and display it to the user. Iam new to MySql what are the settings that i have to do and any samples related to it please help me regarding it.
Thanks in Advance.....
sampath-padamatinti
|
|
|
|
|
|
|
HI all,
i m using a CSliderCtrl,i m using a feature of EnableRangeSelection.
i m use code like this
CSliderCtrl m_Slider;
m_Slider.SetRange(0, 50);
m_Slider.SetPos(32);
m_Slider.SetSelection(22, 42);
its not working in XP,while its working fine in Vista,
so please tell me solution for this.
thanks in advance.
|
|
|
|
|
Does the slider control have the TBS_ENABLESELRANGE style? What happens if you comment out the SetPos() statement?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Yes i m set TBS_ENABLESELRANGE;
when comment out the SetPos the slider not take position.
|
|
|
|
|
iwt.dev wrote: when comment out the SetPos the slider not take position.
Obviously, but is the range set?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I want to program the tool about sending packet which can select the network Adapter interface and send the frame which you build up any frame, for example, ARP and PPP packet.
|
|
|
|
|
Hai All,
I Want to know that, will CryptEncrypt(..) and CryptDecrypt(..) Windows API's support to Encrypt and decrypt the Unicode data ?
Bcoz i Did encryption and Decryption of unicode data with this API's i got Some additional Letters at the end of line.
please some tell how to solve this issue.
Thanks in Advance
Mahe
|
|
|
|
|
There should be no issue with unicode data.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
Hi David,
thankyou for ur responce, it helped for me.i solved that problem with some other methods.
thanks
Mahe
|
|
|
|
|
Hello everyone:
I am sure everyone has noticed whenever you are watching a program on the major TV networks after every commercial break when the program resumes they have another pop-up advertisement. These advertisements take up the bottom third of the screen. I find this annoying. I have just seen a commercial, now I want to see the program not another advertisement.
Has anyone thought of making a software program that would block these stupid advertisements that come up during the first few seconds during the continuation or start of a program?
I would happily pay for such an application for my cable box.
I discussed this with my cable provider they said it is generated from the network nad they can't do anything about it. I think it is another signal piggybacked onto their primary one. I would think that this signal could easily be filter out.
Thanks for letting me spout,
Quecumber256
|
|
|
|
|
TV content providers would be "clueless" if they have split signals for normal shows and advertisement to be sent to a customer's cablebox/receiver; and I'm certain a advertiser would not be happy about that either.
The cable box probably receive the full content, advertisement and show in one nice package.
This signature was proudly tested on animals.
|
|
|
|
|
Maximilien,
Either they are "clueless" or greedy. Let us face a simple fact. My internet browser lets me block pop-ups and it is done using some type of software. It should be simple to block a piggybacked signal.
If this keeps up I will start watching all my programs over the internet. This offers me two benefits: 1 - Limited commercials. 2 - No pop-up advertisements at the start or continuation of a program.
Thanks for the reply,
Quecumber256
|
|
|
|
|
Hi,
I am using WindowsXP.I want to send integer no. through sockets.Actually to send an array through sockets we have to use send(socket_name,array,sizeof(array),flag).But i don't know whats the case when integer comes?
|
|
|
|
|
if you need to send just one int then you may do something similar to:
int i=5;
int bytes_sent;
bytes_sent = send(socket_name, (const char *) &i , sizeof(i) , flag);
If you need to send an array of integers:
int arr[]= { 10, 7, 25 };
int bytes_sent;
bytes_sent = send(socket_name, (const char *) arr , sizeof(arr) , flag);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hey CPallini, thanks for suggestions
|
|
|
|