Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

bond006

@bond006
About
Posts
13
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Everytime I send data I lose the connection!
    B bond006

    double-post, because I got an error message first :(

    C / C++ / MFC help question

  • Everytime I send data I lose the connection!
    B bond006

    I only develop the server. The client is working well with other servers and it is open source.

    C / C++ / MFC help question

  • Everytime I send data I lose the connection!
    B bond006

    Hello, I always lose the connection to a client, when I send data and want to receive data again. I don't know why. :( 1. AcceptEx() 2. ReadFile() <- at this point I received the last data 3. WriteFile() <- I think I lose the connection at this point! 4. ReadFile() 5. WriteFile() 6. ReadFile() . . . ---- What am I doing wrong? ;) I hope you can help me, bond006

    C / C++ / MFC help question

  • What's that? I can't add more variables in a class - then the whole program doesn't work!
    B bond006

    I don't know how I solved the problem. I didn't use malloc and I had no static variables in the class. It was a quite weird problem.

    C / C++ / MFC help sysadmin performance question discussion

  • How do I receive data after an completed AcceptEx operation?
    B bond006

    I solved the problem, but I got a new problem. ;) I'm able to send the return packet and I'm able to call WSARecv() on the socket, but I always receive the data, I sent. ;) What's this???

    C / C++ / MFC help question

  • How do I receive data after an completed AcceptEx operation?
    B bond006

    Hello, I want to receive data after an AcceptEx() call. A brief overview: 1. I listen on a port and receive data with the buffer I've passed to AcceptEx(). 2. When there is incoming data I process the data and send a return packet. 3. Now I wan't to receive data from the same connection again. I tried to use WSARecv() on the socket, but everytime I use WSARecv() I get an error with the error code 10014 (The system detected an invalid pointer address in attempting to use a pointer argument in a call). When I create a new socket with the socket(), bind(), listen() accept() procedure and pass it to the WSARecv() function I have no problem in calling WSARecv(), but I wan't to receive data from the socket on which I sent data. Can I use AcceptEx(), send() and then WSARecv() in this order??? How would you do this? ----------------- Thank you for your attention, bond006

    C / C++ / MFC help question

  • What's that? I can't add more variables in a class - then the whole program doesn't work!
    B bond006

    Hello, I've created a program which is waiting for incoming network connections via I/O Completion Ports and I've created a pointer in the network class to a packet processing class which's object is created outside of the class on the heap memory. All the things worked fine, but I got an error. No compiler or linker error - no error at all, but GetQueuedCompletionStatus() doesn't receive completed packets, when I add a specific number of bytes (in variables) in the Packet Processing Class. What's this??? Memory problems? Other problems? The Processing Class do nothing - an object of it is just created - that's all and the Packet Processing class has no relation to the Thread Function which is call the GetQueuedCompletionStatus() function. I can only add a WSABUF variable plus 3 bools and 1 short. That's all. What do you think is the error? Thanks for your attention and your help, bond006

    C / C++ / MFC help sysadmin performance question discussion

  • Re-using a socket after a completed AcceptEx() call!
    B bond006

    Which socket? The listener socket or the accept socket? ;) When I close the listener socket I have no sockets at all! :) bond006

    C / C++ / MFC help question

  • searching arrays
    B bond006

    I'm not sure if I understood you, but that's quite simple. An example: ------------------------------------------ #include #include #include void main() { char singleLetter; bool wordCompleted = false; unsigned int numOfLetters; unsigned int numOfGuessedLetters = 0; cout << "Number of letters: "; cin >> numOfLetters; char* pArray1 = new char[numOfLetters+1]; char* pArray2 = new char[numOfLetters+1]; memset(pArray2,'_',numOfLetters); pArray2[numOfLetters] = '\0'; cout << "Type in the word: "; cin >> pArray1; system("cls"); // Should the other player see what word we've typed in? ;) while(wordCompleted==false) { cout << "Type in a letter: "; cin >> singleLetter; for(unsigned int i=0;i

    C / C++ / MFC question com game-dev algorithms data-structures

  • new Threads and MultiThreads
    B bond006

    That's quite simple! :) Try something like this: // ------------------------------------------------------ #include UINT threadID; unsigned WINAPI ThreadFunc(LPVOID param); void main() { CPCICard pPCICard = new CPCICard(); _beginthreadex(NULL,0,ThreadFunc,NULL /*that's the parameter for the ThreadFunc*/,0,&threadID); DoSomeWorkBlablabla(); delete pPCICard; } unsigned WINAPI ThreadFunc(LPVOID param) { DoSomeThreadWork(); RunningLoop(); return 0; } // --------------------------------------------------- I don't know whether I helped you or not, but when you call _beginthreadex the ThreadFunc function is called and then two threads running on the same time, doing different things. :) bond006

    C / C++ / MFC performance tutorial question

  • Visual Studio .NET Skills Assesment
    B bond006

    This assessments remind me of those Cisco CCNA assessments. eeem let's see. One question - four answers - the chance is 1:4 that I choose the right answer. ;) Not bad! By the way: I know nothing about Rich Client. What is it good for? ;) bond006

    The Lounge csharp css visual-studio com

  • Star Wars computer
    B bond006

    $10,000??? Uuuh - that's quite a lot money! ;) Don't do this at home kids. What drives him so crazy to do that?

    The Lounge csharp html database

  • Re-using a socket after a completed AcceptEx() call!
    B bond006

    Hello, I have a little problem on re-using a socket after a completed AcceptEx call. The number of maximum clients is equal to the number of sockets in my program. On every socket I made an AcceptEx() call to accept a new connection and receive the data. So far so good. After receiving the data I need a new AcceptEx() call which can receive data from other clients who are trying to connect. But - something is going wrong! When I simply recall AcceptEx() on the same listener socket and the same accept socket I get an error (WSAEINVAL / 10022L). Do I have to close the socket before I try to make a new AcceptEx() call on that socket? I would like to re-use this socket and leave it open, because it's queued in a completion port. I hope you can help me. Thanks for your attention! bond006

    C / C++ / MFC help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups