High score Linux through the current server side writing client C language program

Updated on technology 2024-03-05
14 answers
  1. Anonymous users2024-02-06

    Occupy a place, go back to you at night, what I do is a small program for socket communication in C language, I first created a daemon, my daemon, and the task I do is the work of the relay program you said, the client of communication, first send the message to the daemon, and then the daemon ** to another client.

    Daemon: The daemon, commonly known as the daemon process, is a background service process in Linux. It is a long-lived progression, usually independent of the control terminal and periodically performs a certain task or waits to process some occurring event. The daemon often starts when the system boots in and terminates when the system shuts down.

    Linux has many daemons, most of the services are implemented through the daemon, and the daemon can also complete many system tasks, such as the job planning process CROND, the printing process LQD, etc.

    Because in Linux, the interface between each system and the user is called a terminal, and every process that runs from this terminal will be attached to this terminal, and this terminal is called the control terminal of these processes, and when the control terminal is closed, the corresponding process will be automatically closed. The daemon, however, is able to break through this limitation, starting from being executed and not exiting until the entire system shuts down. If you want a process not to be affected by changes in users or terminals or otherwise, you have to make the process a daemon.

  2. Anonymous users2024-02-05

    The default compiler in gcc:

    GCC is the C compiler.

    G++ is the C++ compiler.

    TakeCPP, the C++ compiler is also automatically called.

    Also, there is a problem with the compilation command given.

    C is generally a C source ** file.

    The output of the command should be an executable file, and it is generally not suffix in Linux.

  3. Anonymous users2024-02-04

    The file name is changed to, or the command is g++.

    Also, you should add a return 0 sentence to the end of this function; This is a must, although it will not be reported if it is not added.

  4. Anonymous users2024-02-03

    Create a folder first, open it with VI and write a C program.

    Compilation method: gcc -o ac

  5. Anonymous users2024-02-02

    Write a program as you like.

    The method of compilation.

    cc -o abc

    That's it if you need to add other libraries.

    cc -o abc

    If you use a dynamic library like this (e.g. use the curses library cc -o abc -lcurses

  6. Anonymous users2024-02-01

    Use the viri.

    Below is the use of virus.

  7. Anonymous users2024-01-31

    Just type the command directly gcc enter gcc is a pure character compiler, and you can't see any information under the graph.

    Alas, Ubuntu misled a lot of people.

  8. Anonymous users2024-01-30

    If you want to learn Linux development, don't use Ubuntu. His development package is cumbersome to install.

    It is recommended that you choose Fedora, and select the development section during installation.

    If the capacity of the hard drive allows, it is best to choose a full installation.

  9. Anonymous users2024-01-29

    If the source file has already been written, the cd goes to the directory where it is located.

    gcc -o filename

    filename

  10. Anonymous users2024-01-28

    I don't quite understand what you mean, C programming under Linux is generally implemented through GCC.

    For example, a text is created, written in the text.

    #include

    int main(void)

    Then enter in the terminal.

    gcc –o hello

    tmp/hello

    Note: The file is placed in the tmp directory, and a hello file is generated through the gcc -o hello command, which is an executable file, and then executed directly, and the program can be run.

  11. Anonymous users2024-01-27

    There are many compilation parameters of gcc, you can check the manual to choose the compilation method according to your compilation purpose, after compiling according to the general method, you can execute it by pointing out the path of the object file, or you can put it in the path indicated by the environment variable, and directly enter the command in the terminal to execute.

  12. Anonymous users2024-01-26

    Use vi to open, enter vi **c in the terminal, and then press esc :q to enter gcc **c -o a in the terminal and enter again. a Enter.

    The result is displayed right in front of the username.

  13. Anonymous users2024-01-25

    For example, gcc -o file path a

    gcc ./a

    You can copy the file path in its properties and paste it directly.

  14. Anonymous users2024-01-24

    Take a look at my example, executing it in a child process"ls -l /usr/bin", wait for the child process to finish executing the child process, and print the time (in milliseconds) used by the child process to execute ls.

    #include

    #include

    #include

    #include

    int spawn_child()

    elseint main()

Related questions
27 answers2024-03-05

Unless you redo your Vista system ...

I used to be also an XP plus a linux... It's only after the rework! >>>More

9 answers2024-03-05

Detect the Linux system.

The following describes whether to enable the FTP server >>>More

10 answers2024-03-05

sudo is a Linux system administration directive, which is a tool that allows system administrators to let ordinary users execute some or all of the root commands. >>>More

9 answers2024-03-05

man shmget as well as shmat(2), shmctl(2), shmdt(2).

If the operation you can refer to. >>>More

12 answers2024-03-05

Use a wireless land gamer, and then buy a junction box.

You can provide wireless network to the laptop at the same time. >>>More