|
Thank you.
I had just try the sample and it seems to work .
Thanks!
|
|
|
|
|
Hi all
I have a server on a Windows machine that should accept client connections to send them data. This server is distributed with a software and all I have to do is to write the client application using socket programming.
If I write the client under Windows, it will work correct. But if I write the client under Linux, the client cannot connect to the server returning the error 'Connection timed out'. I use C++ and C# under Windows and C under Linux.
To make sure that my Linux client is correct, I wrote a server application under Linux and they worked correct. So I think that the problem is in Windows-Linux communication.
Any help...
Regards
islheg
|
|
|
|
|
Dumb question but do you have the correct server address?
-Steven Hicks CPACodeProjectAddict
|
|
|
|
|
Yes, and I can connect to it using telnet.
|
|
|
|
|
islheg wrote: I use C++ and C# under Windows
How are you creating the server side? Which classes? Classes such as CSocket[^] are windows centric.
|
|
|
|
|
I don't create the server side. It is ready made, the SerialForwarder, and listens to port 9001. For the linux client, I use C socket structure which does't work. For a windows client, I use C# Socket class.
|
|
|
|
|
please check using "netstat -an" in windows which port ur server is actually listening and is your linux client conecting to that actual port are you using HTONS or someting while assiging port nunmber.?? HTONS will twiddle your portnumber.
|
|
|
|
|
netstat -an gave me 0.0.0.0:9001 which is the correct port. The SerialForwarder server is ready made and I don't know how the port number is assigned in it. However, in the linux client I don't use HTONS to assign the port number, I assign the port number as 'addr.sin_port = 9001; '
Regards
islheg
|
|
|
|
|
Hi all. When making a socket program under Windows, would it be better to use a do loop over a while/for loop when you use the send()/recv() functions? Im just curious because im looking at some sources that have the do loop and a few while loops inside the function. Thanx in advance!
|
|
|
|
|
A better way to do this, if doing Windows API programming is to use the WSAAsyncSelect() API to send notifications to a window when any network events occur for a socket. Look at the documentation on MSDN here.
Hope this helps!
--PerspX
|
|
|
|
|
They basically do the same thing, only in slightly different manners. E.g., do{}while() and while(){} loops are exactly same except that the do loop executes at least once, because the condition is only tested at the end of execution.
Best,
Jun
|
|
|
|
|
Hi,
I have images coming to me very quickly, 200 pictures per second, I have all the BYTE arrays, and I need to do a lossless compression in realtime, is there any algorithm out there that can keep up with this, and is there anyway code samples that allow me to do this.
Thanks in advance.
|
|
|
|
|
The only thing I can think of that might keep up is RLE (Run Length Encoding). It won't give you that much compression, depending on the images, but it is light and fast. If you're talking sequential video frames then a frame difference algorithum might be better. I thought most people still used DSP hardware for this sort of thing
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Hi Godspeed,
godspeed123 wrote: I need to do a lossless compression...
PNG is a nice format - it is basically a compressed bitmap. It is available an PNG8 and PNG24. I don't know through put numbers for the realtime requrements.
I should probably be asking, what is the current format of the images?
Jeff
|
|
|
|
|
Right now they come in a byte stream, there is no format to them, its basically just raw data.
|
|
|
|
|
Where are you getting that frame rate from? if its a camera you might be able to get away with differences on the images, which would be a small performance hit but not nearly as much as converting it to PNG. My advice if you do wish to compress the images send the data to a grid for conversion to bitmap and then to lossless PNG.
-Steven Hicks CPACodeProjectAddict
|
|
|
|
|
I have a rather unusual situation where the monitor needs to present video capabilities (via DDC) that are actually less than what it actually supports, causing Windows configuration utilities to present a subset of options.
However, programatically I want to set video paramaters (resolution, refresh) to any of the actually supported configurations within the limits of the graphics card.
So, is there a way to determine the graphics card's capabilities, and to set them even though the system does not think the active display can support them? It seems that ChangeDisplaySettings will not allows settings that were not claimed to be supported (through monitor ddc exchange).
Thanks in advance!!
Jeremy
|
|
|
|
|
nonameseemstowork wrote: So, is there a way to determine the graphics card's capabilities...
What about GetDeviceCaps() ?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
It appears that call returns information about what the display can do based on what it sent the PC during the DDC exchange. I have a case where there are 'non-published' configurations that the display can support. But ChangeDisplaySettings only allows settings that are advertised by the display through the ddc exchange.
Jeremy
|
|
|
|
|
Does anyone here know of a IEEE_754 math library implementation, Open source or free, in C++. Obviously it would need to be Intel/Win32 compatible but portable is better still?
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
I create SDI project using CFromView is parent class and on the client area has list control.
I want to run this application in maximize but the list control doesn't
spread follow main windows.
Anybody know
How can I solve this problem?
|
|
|
|
|
What if you add a WM_SIZE handler to the parent window of the list control.
In response to WM_SIZE, resize the list control appropriately.
For example, here's a way to resize the list control to the full client area of its parent:
void CMyFormView::OnSize(UINT nType, int cx, int cy)
{
CFormView::OnSize(nType, cx, cy);
ListCtrl.MoveWindow(0, 0, cx, cy);
}
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi All
I am using VC++6.0 for my project.I want to know how to change font of tooltip control from default font to other font. If any body have some hint or code then plz forward me.
Thanks in Advance
Atul
|
|
|
|
|
I answered to you but you asked again?
|
|
|
|
|
Hi all,
I wrote a database dll. The dll exports the whole class.
i.e.
#ifdef STATIC_LIBRARY
#define DLL_IMPORT_EXPORT
#else
#ifdef WIN32
#ifdef DBMODULE_EXPORTS
#define DBMODULE_API __declspec(dllexport)
#else
#define DBMODULE_API __declspec(dllimport)
#endif
#endif
#endif
class DBMODULE_API Database
{
...
class DBMODULE_API Recordset
{
But when I try and get hold of the class constructor in my calling application, I receive linker errors.
i.e.
...
Database db;
Recordset rs = Recordset(&db);
...
Can anyone please help me?????
Many Thanks
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|