|
hi all,
I have a simple chat program that uses windows sockets...
The problem is if my chat server is behind a Proxy, then the clients are unable to connect to the server...
How can i establish connection between a remote client and my server which is behind the proxy...
Does 'HTTP Tunnelling' Help?? If yes, where can i get more info on it??
please help !!!
ananth
|
|
|
|
|
Here at CodeProject you can have a look at Alex Turc's article HTTP Tunneling.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi..
I have looked at the Alex Turc's HTTP Tunneling project... I think it would allow client applications to make connections to a remote host via a Proxy..
I want to know if this technique would also work for a Remote Client, trying to connect to a local host when there is a Proxy in between, that is a remote client wanting to initiate a connection to a local host?? Can proxy allow such a connection to take place???
regards
ananth
|
|
|
|
|
If what you're trying to do is connect to a remote host inside a local network, that network should have some form of NAT (Network Address Translation) installed to make the remote host (or some TCP ports of it) visible to the outside world. There are various NAT systems, but all of them work replacing public addresses with private ones. Sort of like a proxy, but at a TCP/IP level (i.e., the system is transparent to the endpoints of the connection). Look for NAT on your web searcher.
Generall, NAT systems are managed and configured by the network administrator, so if he hadn't made public the remote host you're trying to connect to, there's litle you can do from the outside.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi !
I´m an XML novice, I have read several docs and things about XML, and I would like now to start making some little things, but...
All the samples I have found are in VBasic, and I would like to have them for MFC and for ATL, and using smart pointers. I know that is not so VBasic, the interfaces and stuff are COM, but I would like to see some examples running on VC++ because I´m not too used to translate from VBasic COM stuff to VC++.
By the way, I have read that ADO is a good thing to manage to DOM trees ( what I would like to do first is just to generate an XML file, and read it, is it ok to use ADO or is better to use that only for database related things ? ( I´ve used that technology only to manage with Databases).
Thanks Bye !
Braulio
|
|
|
|
|
Braulio,
To get started there are several classes with different flavors on this site.
http://www.codeproject.com/soap/
I would recommend getting the msxml 4 core services and experimenting.
http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/001/766/msdncompositedoc.xml
Create an XML file and then see if you understand how the parser really breaks the data up into child nodes. Read in the file and step through the nodes testing the type in debug mode. You can do this from sample code from several of the sample on code project as well as the msdn site.
|
|
|
|
|
As suggested, download and install the XML SDK. The examples can be filter for the language of choice, i.e. VB, C++, JavaScript
|
|
|
|
|
|
Guys,
Does anybody have an idea how to display stock quote in a C/C++ application. I am thinking of using a free stock quote server such as Yahoo Finance. How do I conect and retrieve this information? Any guidance in the matter is most appreciated.
Regards,
SAK
|
|
|
|
|
From and ATL server written in VC 6.0 with one interface I would like to publish to VB clients enumerated values.
VC header-
enum FileTypes{ FILE, MEMFile, MEMORY};
My VB code looks like;
Dim y As Object
Set y = New PARMIOLib.BufferIO
'where 0 stands for FILE
'where 1 stands for MEMFile
'where 2 stands for Memory
y.FileFormat 0
How do I replace the 0, 1 and 2 with enumerated values?
thanks
|
|
|
|
|
It has been a while since I did this, but I think you need to put the enum defines in the IDL.
Michael
|
|
|
|
|
That makes good sense. Thank you.
I have looked for an example of the syntax, but have not found it.
|
|
|
|
|
Which is the prefered memory allocation method when the need for memory can be anywhere from 10 to 10mb...?
Would it be acceptable to use new over VirtualAlloc() under most circumstances....I read an article on VirtualAlloc and the author suggests using new whenever possible and you only need VirtualAlloc() if your gonna use major memory resources and stay running for long durations, like software running on NT. Is this generally acceptable practice...?
TIA
"An expert is someone who has made all the mistakes in thier field" - Niels Bohr
|
|
|
|
|
If you have a requirement that the pages you reserve remain in main memory and not swapped to virtual (possible disk memory)then VirtualAlloc gives you more control.
Are you writing some kind of service or kernel related task?
Do you reserve large chunks of memory but not always use it?
If none of the above is true then let the OS do what it does best and manage memory pages for you. Using New is much more acceptable as a general practice.
|
|
|
|
|
Just a generic text editor buffer, allocating 4096 byte pages. I would like to make the buffer grow to virtually unlimited size, but the hassle's I assume with VirtualAlloc are greater than the need for unlimited memory.
Heres the problem i foresee(spelling)
You can only lock 30 pages at any given call to VirtualLock, which creates the problem of not being able to lock once, move all, but instead i'd have to lock move 30 pages, unlock, lock again move another 30 and so on...am i right here...?
"An expert is someone who has made all the mistakes in thier field" - Niels Bohr
|
|
|
|
|
I have a program which creates an MCI window and plays a .avi movie.
At my school network, which runs win98, the program ran perfectly.
At home where I have win2k, it won't open. I've made sure the path is correct (the video is on cd as well so it's only something small like "H:\\movie.avi") and nothing was changed between the time I ran it at school and brought it home.
Are there any know problems with MCIWndCreate (or MCIWndPlay perhaps?) in win2k?
I'm quite curious as to why this doesn't work.
Thanks
|
|
|
|
|
I am trying to redraw the CHeaderCtrl contained in a CListCtrl and would like to handle WM_PAINT messages. Problem is when I do the control never stops painting.
Any help greatly appreciated
|
|
|
|
|
Post your OnPaint() code. Sounds like something you're doing in OnPaint() is causing another WM_PAINT message to be fired.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
You didnt put an UpdateWindow in your paint handler, did you?
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
I'm getting an error when I try to get the contents of a CEdit control. I'm have a SDI MFC app that has a dialog bar. I put a CEdit control on it and I get an Assert error. I guess you can't do this in the Doc/View architecture because it works when I tested it in a Dialog App.
CEdit* pEdit =(CEdit*)GetDlgItem(IDC_EDIT1);
Any help would be appreciated becuase I don't normally use MFC
<marquee style="filter:blur(Add=1, Direction=90, Strength=4)">I Microsoft and
|
|
|
|
|
This approach is fraught with error. You should store the edit control as a member variable and access it that way.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Just a suggestion, but why not use m_edit1.GetWindowText()?
|
|
|
|
|
From what context are you calling GetDlgItem?
The code you have should work, but only if GetDlgItem is called from the right context. For example, if you dialog bar is called m_dlgBar, then you should have, m_dlgBar .GetDlgItem (IDC_EDIT1). My best guess is that you are calling GetDlgItem from your main window class or a view window.
Then again, it has been a while since I used MFC and I could be wrong.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
In which of your classes have you put that code?
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Actually, I would guess that your problem is a result of timing. When are you calling GetDlgItem()? If you are calling it before the control has been created, you will get an assert.
Yes, there are people who argue that using GetDlgItem() is bad - don't listen to them! Both ways are valid. Form your own opinion! Check this article for a well-written explanation of one side...
J
|
|
|
|