Search:

Type: Posts; User: radeberger

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    0
    Views
    3,578

    basic question about global variables

    Hi everybody,

    I have a basic question about how to share data between classes. I want to avoid the use of global variables but I'm using semaphore as synchronization object and global counter...
  2. Replies
    0
    Views
    1,274

    Lists for producer/consumer problem

    Hi everybody,

    has anyone any ideas to implement a mailbox in c++? I didn't find any classes....

    I have an application that implements the consumer producer problem. I'm thinking to use lists...
  3. Replies
    13
    Views
    2,219

    Hi, I know it's stupid to have thr1 and thr3...

    Hi,

    I know it's stupid to have thr1 and thr3 in the same port but I communicate with a machine that use this port (actually I try to change this but at the moment it works so, and no, that's no...
  4. Replies
    13
    Views
    2,219

    I forgot to say that I need to set priority...

    I forgot to say that I need to set priority levels because thread1 and thread3 are using the same ports to send (it works so at the moment with the machine). That is both can want to send at the same...
  5. Replies
    13
    Views
    2,219

    because that is design requirements, while thread...

    because that is design requirements, while thread 2 allocate data in memory thread3 can send data to other machine.



    windows xp

    >> A semaphore with the maximum count to 1 is like a mutex?...
  6. Replies
    10
    Views
    1,709

    I tried what you say and it works but I tried...

    I tried what you say and it works but I tried other thing too: I create the mutex in the second thread function with the second parameter TRUE and the main function takes it. Is that because main...
  7. Replies
    10
    Views
    1,709

    The thing is that with semaphore I can control...

    The thing is that with semaphore I can control what thread begins first but with mutex I don't know how I can do it.
    I have two threads:
    The first thread is the main function, so it starts first....
  8. Replies
    13
    Views
    2,219

    thread synchronization

    Hi everybody,

    I'm programming an application with severe dependency conditions between three threads. I want to ask you for ADVICE:

    I will try to describe my problem: (Thr1, Thr2, Thr3 are...
  9. Replies
    15
    Views
    4,360

    Hi everybody, I found the error. I used the...

    Hi everybody,

    I found the error. I used the function recevfrom and the last two paramaters are a pointer to a buffer in a sockaddr structure that will hold the source address upon return and the...
  10. Replies
    10
    Views
    1,709

    thread1 is my main function...

    thread1 is my main function...
  11. Replies
    10
    Views
    1,709

    in the main I create the mutex:...

    in the main I create the mutex: CreateMutex(NULL,FALSE,NULL) I think with the second parameter to FALSE the main thread doesn't take the mutex the first time. After that I create the second thread...
  12. Replies
    10
    Views
    1,709

    first ownership of a mutex

    How can I give the first ownership of a mutex to a thread?

    I mean, I have two threads in my applications. thread 2 must wait for thread1 but it doesn't because thread2 runs before and takes the...
  13. Replies
    15
    Views
    4,360

    I don't want that two threads print out something...

    I don't want that two threads print out something on the screen at the same time
  14. Replies
    15
    Views
    4,360

    what would you recommend me to synchronize the...

    what would you recommend me to synchronize the cout on the screen? a mutex or a semaphore?
  15. Replies
    15
    Views
    4,360

    I think it's a synchronization problem because I...

    I think it's a synchronization problem because I use a mutex for the screen and I think something is wrong but I can't see it....
  16. Replies
    15
    Views
    4,360

    Sorry, I wrote something wrong, the first time...

    Sorry, I wrote something wrong,

    the first time it receives port=2000

    but the second time=49154 and not 2000
  17. Replies
    15
    Views
    4,360

    I don't understand why after the TCP connection...

    I don't understand why after the TCP connection the destination port of my UDP connection is changed...but I have made debugging and I know that it occurs...
  18. Replies
    15
    Views
    4,360

    now I have this code ...

    now I have this code



    while(AcceptSocket==SOCKET_ERROR)
    {
    Acceptsocket=accept(socketInTCP,NULL;NULL)
    }
    socketInTCP=AcceptSocket
    while(run_tcpserver)
  19. Replies
    15
    Views
    4,360

    I don't know. but the destination port is wrong...

    I don't know. but the destination port is wrong after successively recv...

    that is my question....
  20. Replies
    15
    Views
    4,360

    Hi again, Now I can describe the problem...

    Hi again,

    Now I can describe the problem better

    I have a tcp server that wait for data in the recv function after accept. I receive data buffer of 1500 bytes but I don't receive only one...
  21. Replies
    15
    Views
    4,360

    Hi, I must use different connections (design...

    Hi,

    I must use different connections (design requirements...)
  22. Replies
    15
    Views
    4,360

    Socket Destination Port Problem

    Hi everybody,

    I have an application where two different socket connections run in order to communicate with a machine. Over the first one (UDP) I send a request packet to ask for data and over the...
  23. Replies
    16
    Views
    4,103

    shall I show you some code?

    shall I show you some code?
  24. Replies
    16
    Views
    4,103

    Well, it's possible but my problem now is that...

    Well, it's possible but my problem now is that the thread in the main function stays at the point "WaitForSingleObject()" forever although the other thread have already released the mutex...
  25. Replies
    16
    Views
    4,103

    When you create a mutex with the second argument...

    When you create a mutex with the second argument BOOL bInitialOwner, TRUE, the ownership goes to the thread who created it. I tried to use it with FALSE but it doesn't work. The thread takes over the...
Results 1 to 25 of 35
Page 1 of 2 1 2