Search:

Type: Posts; User: jstechg

Search: Search took 0.00 seconds.

  1. Solved: If I use pthread_self() instead of...

    Solved: If I use pthread_self() instead of getppid() the programs works fine.
  2. A segmentation fault occurs when thread_kill is executed.

    I am developing a simple program in C on linux in which there is a thread that checks the time elapsed since the beginning of the program and when they have passed 10 seconds, sends an end signal...
  3. I solved this issue by myself. Is necessary...

    I solved this issue by myself.


    Is necessary to add on MapExample.cpp the lines:



    std::map <int,int> MapExample::map3;
    std::map <int,SData> MapExample::map4;
  4. Basic class using static map does not compile.

    I am testing in linux the use of map in a C ++ class called MapExample.


    If only map1 and map2 appear in this class, it compiles and works correctly, showing on the screen the exit:



    Hello...
  5. Replies
    8
    Views
    11,467

    Thanks, I am going to try this. But I want to...

    Thanks, I am going to try this. But I want to have a multithread server. So, I think that defining the thread function as static is not a good idea.

    Colud be that I define it as friend instead?
  6. Replies
    8
    Views
    11,467

    serverTCP.c: (C version. It works fine) ...

    serverTCP.c: (C version. It works fine)
    ------------


    #include <stdio.h>
    #include <sys/socket.h>
    #include <arpa/inet.h>
    #include <stdlib.h>
    #include <string.h>
    ...
  7. Replies
    8
    Views
    11,467

    client.c : (It works fine) ---------- ...

    client.c : (It works fine)
    ----------


    #include <stdio.h>
    #include <sys/socket.h>
    #include <arpa/inet.h>
    #include <netdb.h>
    #include <stdlib.h>
    #include <string.h>
  8. Replies
    8
    Views
    11,467

    The TCP server that I am developing as a C ++...

    The TCP server that I am developing as a C ++ class is based on a C client-server application that works perfectly.

    The C ++ class of the server is intended to be a replica of the server written...
  9. Replies
    8
    Views
    11,467

    Segmentation fault on TCP server.

    I have developed a server in C ++ and a client that connects to it.

    Both are running on a PC with linux.

    When we run the server and a client is connected to it, a
    Segmentation fault on the...
Results 1 to 9 of 9