|
I'm just looking for an easy way to send files from one client to another client. Those clients are connected to the same server.
If I do from client to server from server to another client... understand?
My server should be slow if 10 clients are sending files to another client... shouldn't it?
PS: Moak, for the last time! SIGN IN ON CODEPROJECT!
Rickard Andersson@Suza Computing
ICQ#: 50302279 (Add me!)
E-mail: nikado@pc.nu
I'm from the winter country SWEDEN!
|
|
|
|
|
Hej Rickard,
I think you might tell me some more about your project/plans, what you wanna do in general. I'm slightly familiar with server programming and peer-to-peer filesharing systems (I wasted some time with Gnutella, hehe).
Transfering files from one client to another via the server costs the server (if serving many clients) a lot of traffic. I suggest do it peer by peer: once the clients know each other (e.g. exchange IPs via server), they can transfar data direct. For example IRC's DCC send does it that way (DCC=direct client to client) and all know filesharing systems like Napster, Gnutella, Fastrrack do the filetransfar itself direct peer to peer. Advantage: no man in the middle has to provide bandwith (fast), disadvantage: firewalled hosts or hosts behind a router (SNAT) can be a trouble.
But there are various ways around firewall troubles with file transfar: one un-firewalled host from two is enough, using SOCKS, using the IRC DCC protocol (which is routed through many known SNAT router) or as last chance do tunneling via a central server or a third (unfirewalled) peer.
Hope it helps, Moak
PS: Why signing up, is there any advantage? You can contact me anytime on www.p2pchat.org (IRC irc.p2pchat.org) any you have my mail.
|
|
|
|
|
mail me when you have a finished beta version
happy weekend
|
|
|
|
|
Hi!
I'm writing a simple dialog based application (MFC - Visual C++ 6), and it requires a large number of controls to appear on the same dialog. It will be running on Win98.
It compiles ok, and when ran on a WinXP machine it works fine. However, when ran on a Win98 machine, only the first 14 controls (as set out in .rc file) appear.
Anyone have any ideas about what this could be?
Martin
|
|
|
|
|
I know this probably isn't much help but I know I have read some where that you can only have x number of windows on a 9x machine.. and each control counts as a window.. I'm sorry but I dont remember the number.. You may do some searching on MSDN..
Rob
|
|
|
|
|
There is a limit of 255 (256?) controls on a dialog resource. WinXP may not have this limit, but I have definitely run into it on Win9X.
How many controls are there on your dialog total?
When I have encountered this problem before it did various things on Win9X. On certain versions it would not display the dialog, on others it displayed all but some of the controls and on others it blew up.
|
|
|
|
|
Yeah, my problem seems similar to the one you had. Only 14 controls are appearing (excluding the actual dialog). [Are visual basic controls not affected by this limit? Because I have written this program in VB before and it works ok.]
So how do I get round this problem. Do I need to design my dialog?
Martin
|
|
|
|
|
If I recall correctly, the 254 limit does not apply to VB because of the way it generates its forms. The solution to my problem was to write my own dialog editor and display engine. That's probably overkill for you. You can 1) redesign your dialog and break it into multiple resources and at run-time combine them. 2) you can use property sheets, 3) you can dynamically create your controls at run time.
|
|
|
|
|
Ahh! So I take it dynamically created controls are not included in the limit then? If so then that's great. But it really doesn't explain why only 14 of them are appearing (as opposed to the 254 limit)
Martin
|
|
|
|
|
The limit applies to how the resource structure is layed out not how the system displayes controls.
I really can't explain why only 14 of your controls are being displayed. I have encountered this problem twice. Different versions/service packs/installs of Win9X did different things. Some would crash completly, some displayed the first 254 controls, others only displayed a seemingly random number of controls.
|
|
|
|
|
Ok, i'll redesign the dialog.
Thanks for your help
Martin
|
|
|
|
|
I use ACCESS as my database source,but I found if I put lots of data in it (the mdb file's size will increase as XXX kb),after that I delete the data in the database ,to my surprise ,the mdb file's size has'n been modify,that is ,the file's size is XXX kb too.How can I solve it?
because of my poor english,I hope you can understand me!
thank you!
Don't look at me in that way!
|
|
|
|
|
you have to compact the database ... go to the access tools menu and select db maintainance ... compact
"... and so i said to him ... if it don't dance and you can't eat it either f**k it or throw it away" sonork: 100.18128 8028finder.com
|
|
|
|
|
And I want to know more about control it in my program!
thank you!
Don't look at me in that way!
|
|
|
|
|
am not 100% sure you can do that from ur app using sql or whatever ... u might have to get into icky stuff like controlling access as a ole whatsit
maybe theres an easy way but i dont know it
"... and so i said to him ... if it don't dance and you can't eat it either f**k it or throw it away" sonork: 100.18128 8028finder.com
|
|
|
|
|
I think that you could do it in DAO, not sure about ADO/ADO.NET though.
Cheers,
Simon
"Every good work of software starts by scratching a developer's personal itch.", Eric S. Raymond
|
|
|
|
|
To compact Access 2000 database:
try
{
CString s;
s.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s",sPath);
CString d;
d.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;Jet OLEDB:Engine Type=%d",
sTempPath, iVersion);
JRO::IJetEnginePtr jet(__uuidof(JRO::JetEngine));
jet->CompactDatabase(s.operator LPCTSTR(),
d.operator LPCTSTR());
CopyFile(sTempPath, sPath, FALSE);
DeleteFile(sTempPath);
}
catch(_com_error &e)
{
::MessageBox(NULL, (LPCTSTR)e.Description(), "Compact database error.", MB_OK);
}
Maxwell Chen
Lets make bugs better!
|
|
|
|
|
I know this is a little off-topic, but here it is anyway!
I'm desparately trying to install VS.Net and keep getting this error before installing the Windows Components:
"Setup has detected that another program requires the computer to reboot. You must reboot the computer before installing Visual Studio .NET Windows Component Update. Once the system reboots, you need to restart setup. Click OK to reboot. Click Cancel to exit setup and install later".
I've rebooted many times and keep getting the error. Now, what I'd like to do is find out where the setup looks for to determine that the computer needs to reboot and just change the value.
Any idea on how to do that? I'm desparate and I don't want to format my hard drive.
Thanks
Francis
|
|
|
|
|
Can You help me with system tray. I try, but cant do next:
Need to show string in system tray like system clock, but length of the string
is changed in time ( every 10 sec).
If i make in tray some ICON with NOTIFYICONDATA , there is interval between
icons and place of icons may changed if ohher application add/remove own icons from tray. String not correctly displayed.
With Spy++ i find out that sysmem tray ( TrayNotifyWnd ) contains
ToolbarWindow32 (with icons), and TrayClockWClass (system clock)
Is is possible to display string in the tray like system clock.
Possible to get sources of system clock (TrayClockWClass).
Thank You for an advice.
|
|
|
|
|
I have an ActiveX control developed with MFC. It runs it Internet Explorer. I want the container to access a structure defined in the control. How do I do that ?
struct Properties{
int length;
..........
}prop;
Thanks
|
|
|
|
|
add an interface to the control that allows you to get the data from the structure.
-c
ABSURDITY:
A statement or belief manifestly inconsistent with one's own opinion.
|
|
|
|
|
Does anyone now how to open/close a deskband(on the taskbar) programatically? Also, is there a way to make explorer release the deskband? I created a deskband, but if you close it explorer still holds on to it. So you can't delete it without closing explorer.
Thanks
|
|
|
|
|
I have a list control and i want to retrieve either the text or the item number (doesn't matter) of the selected item in the control, but everything I try fails.
==================================================
When Your Mind Wonders...Where Does It Go???
|
|
|
|
|
Use GetFirstSelectedItemPosition to get the selected item.
Now use GetItemText to get the text.
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Hi, everyone,
Recently I am thinking of using one pointer to access two different class. I don't know how to do this.
Here is the detail description:
I've a document class CMyDoc with a view class CCView.
In CCView's OnDraw function, I want to use one pointer pDoc->pCurImage to draw a image (eg. pDoc->pCurImage->Draw()). Because the two image buffer class are similar. They both have a draw function(and a lot of other function except their data type are diferrent). When I load an image from a file, the color image will be loaded into the color buffer(m_ColorImage), and the gray scale image will be loaded into the B/W buffer(m_BWImage), then a pointer m_pCurImage will pointer to the correct image buffer for the view class to display it.
But since the pointer type is (void*), how can a view class to use it.
Or is there any other elegant way to do the same job?
class CMyDoc : public CDocument
{
protected: // create from serialization only
CMyDoc();
DECLARE_DYNCREATE(CMyDoc)
public:
CBWImage m_BWImage;
CColorImage m_ColorImage;
void* m_pCurImageBuf;
...
...
...
}
Is their anybody can help? Any comments are greatly appreciated!
Best Regards,
Wayne King,
17 May 2002
|
|
|
|