Hi all, If i check the IP address of any machine then it shows the following notation of IP in case of IPv4 "127.0.0.1" And in case of Ipv6 "fe80::198:8ad2:22fe:2bff8%4" Is there any API or C function or any logic to convert IPv6 address to IPv4 Address for window and linux. Thanks
singh_nav
Posts
-
How to convert IPv6 IP Address to Ipv4 address -
Error 10038 , at receive on serbver sideHi All, I am creating a client server project . My server is multithreaded, One thread is created for each request from client. Now my problem is: As i send the 10 reuests at a time to the server Some of the receive gets fail even after successful accepting, and give the 10038 error number. I have set the 15 sec time out for rece on client and server side. But my server returns the error with in a second. kindly help
-
Effective Synchronization: Multiple Read, Single WriteBut Semaphore is use to limit the number of thread, where as my requirement is different. I don't want to limit my number of read and write thread. Actually i want that if any writing there is in progress then other all thread ( read and write) must wait. where as any number of reading thread can run concurrently. I believe that this can be archived by WaitForMultipleObject. but how to use it. Any link for the same or any hint. Thanks
-
Effective Synchronization: Multiple Read, Single WriteI am implementing multi-threaded application in C++ in which I have 2 functions i.e. 1. Read 2. Write and both are sharing one global variable. There are 10 threads,1 thread will use write function and rest 9 will use read function.When writing is taking place, all thread should wait else remaining 9 threads should not wait to read. Now my question is how to use the synchronization technique so that 9 threads should not wait if no writing is taking place. Thanks
-
CreatePipe is not working properlyThank you very much This is exactly i wanted for.
-
CreatePipe is not working properlyThanks for the info, Actually , I have used the array in my sample program there i have to synchronize it. Now i want to check that how to use the pipe and will it signal to read Thread automatically as it is written. Please provide any link or sample so i could implement it in the same process. Thanks
-
CreatePipe is not working properlyThanks for the input. Can't i use the PIPE in the same process ?
-
CreatePipe is not working properlyHi All, My exceptions are to write and read data simultaneously.As data is written it should be read by another process.For this I am using the PIPE implementation. I wrote the following code snippet for this but it is not working Please let know where i am wrong Thanks HANDLE rHandle, wHandle ; DWORD dw ; DWORD dw1 ; void WriteData(LPVOID) { char wBuff[512]; strcpy(wBuff, "HELLO world this program for reading the pipe\n ") ; for( ; ; ) { Sleep(1); if(WriteFile(wHandle, wBuff, strlen(wBuff), &dw, NULL)) { printf("Total %d byts written\n", dw); } else { printf("Could not write the buffer Last error:%d\n ", GetLastError()); break; } } } void ReadData(LPVOID) { char wBuff[512]; int i =0 ; strcpy(wBuff, "HELLO world this program for reading the pipe\n ") ; for( ; ; ) { Sleep(1); if(ReadFile(rHandle, wBuff, strlen(wBuff), &dw1, NULL)) { printf("Total %d byts read\n", dw1 ); } else { printf("Could not read the buffer Last error:%d\n ", GetLastError()); break; } } } void main() { HANDLE aThread; DWORD ThreadID; int i; if(CreatePipe( &rHandle, &wHandle, NULL, 0)) { CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE) WriteData, NULL, 0, &ThreadID); CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE) ReadData, NULL, 0, &ThreadID); } }
-
which should use pipe or socket at Client-serverthanks, Actually my application is build for all these platform. And i want to design all code into one application, that time i just need to build at different platform only to support it. Thanks again
-
which should use pipe or socket at Client-serverThanks for the input, Will it work for the different platform. I am to create the server for WINDOWS, Linux and MAC. Thanks
-
which should use pipe or socket at Client-serverHi All, I am working on a client server application. I am having a challenge that i have to serve the 250 client concurrently. Each request takes 2-5 second to execute at server side. For this what should i use 1 PIPE implementation or SOCKET with a queue? and why? Which performance is better. Thanks
-
how to use Named pipe in Client server applicationThanks , It works But now i am finding the new issue. I am able to connect only one client to the server.because pipe is opened by one client so another client is not able to connect it I am connect the multiple client withe same server. how to achive it? Thanks again Navdeep
-
how to use Named pipe in Client server applicationHi, i am new to use the PIPE and client server application. I have been able to communicate the IPC for processes that are on the same computer using named pipe. But i am clueless, how to obtain it for the communication between two different computer OR client - server application. If any example or link is available, please provide. Thanks ND
-
Thread synchronizationHi all, I am having a list(queue)of tasks. My two threads are using the same list. First thread is to insert the task into it. (appending the list) Second thread is to process on each task . ( reading the list) My aim is to give the maximum availability to Thread one without hanging thread two. How to synchronize both thread so that, second thread should not wait for long and First thread keep inserting the item into list. Thanks in advance
-
VC problemHi, When i try to open multiple projects at a time my VC 6.0 hangs & there is no menu bar work & i am not able to work anything in VC. Please help me on this issue. OS: windows 2000 advance Server with SP4 VS SP: 6 Thanks & Regards Sharad
-
how to Build a reguler Dll( unicode competable) in vc++yes i tried to debug it , But it crash before it comes in the App class Init function . ND
-
how to Build a reguler Dll( unicode competable) in vc++Hi All, I have a dll in vc++( It shows one dialog with some static box and list control) . Case 1. If i create this by statically linked in project settings and keep mantain it's default settings( with out support unicode) then it used properly in my project ( Give the desired output) Case 2. If i create it unicode compatiable by using all unicode liberary in project settings then As i use it into my project and build , my project buid properly but terminate as i execute it. ( My project is also unicode compatiable) Why it is happening , is there any other way to build the unicode compatiable dll, or any other type of setting other then exe settings. Thanks SNAV
-
Linking error if project compile in vc8hi All , I have a project which is depend upon another project . Now i am using the function of another project's .h file into my main project file . If i compile it on VC6 then there is no any type error but if i use VC8 compiler then it is showing following linking error I have the proper decleration and defination of these function How to come out this problem ProgressPage.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall ZipUnzip::~ZipUnzip(void)" (??1ZipUnzip@@UAE@XZ) referenced in function "public: void __thiscall CProgressPage::TraverseTree(class ATL::CStringT > >,struct _TREEITEM *,unsigned int)" (?TraverseTree@CProgressPage@@QAEXV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@PAU_TREEITEM@@I@Z) ProgressPage.obj : error LNK2019: unresolved external symbol "public: unsigned char __thiscall ZipUnzip::RestoreFilesFromZipArchive(class ATL::CStringT > >,class ATL::CStringT > >,class ATL::CStringT > >)" (?RestoreFilesFromZipArchive@ZipUnzip@@QAEEV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@00@Z) referenced in function "public: void __thiscall CProgressPage::TraverseTree(class ATL::CStringT > >,struct _TREEITEM *,unsigned int)" (?TraverseTree@CProgressPage@@QAEXV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@PAU_TREEITEM@@I@Z) ProgressPage.obj : error LNK2019: unresolved external symbol "public: __thiscall ZipUnzip::ZipUnzip(void)" (??0ZipUnzip@@QAE@XZ) referenced in function "public: void __thiscall CProgressPage::TraverseTree(class ATL::CStringT > >,struct _TREEITEM *,unsigned int)" (?TraverseTree@CProgressPage@@QAEXV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@PAU_TREEITEM@@I@Z) .\Release/RebuilderWizard.exe : fatal error LNK1120: 3 unresolved externals Regards Navdeep
-
how to compress/decompress dataHi Alexender Thanks for the suggestion and replay. I agree with u but what i just want to do. I read a cluster using ReadFile() function and keep it in buffer . Now my question is how to compress this data which is in buffer so that if i write it any other place as a backup. It takes less memory space in HDD or any other storing device. I am to compress files but cluster by cluster because i want to store the backup of this file in bytes(row) form not in file form [compressed file takes clusters again wastage of space ] . This might be crap idea. But u would be able to help me , i'll be thankfull. Now Ball is in your goal:)
-
how to compress/decompress dataDear all, I am new for this site as well as for VC++. I recently got a job I am working on data compression/decompression. Be very much clear Not file compression/decompression.I am to compress the data cluster by cluster of any harddisk. how can i compress a cluster into bytes or sector? I have no clue about it All suggestion are welcomeed . Thanks snav