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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. what is a multiplexing server?

what is a multiplexing server?

Scheduled Pinned Locked Moved C / C++ / MFC
questionsysadminlinuxarchitecturelearning
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    ThinkingPrometheus
    wrote on last edited by
    #1

    hiho i read a book about linux networking and it describes some techniques for a server but my question is more about software architecture than linux programming so i post it here 1. multiplexing (select()) 2. multiprocess (fork()) 3. multithreaded (pthread's) i understand the architecture of a process pool in which every process holds a thread pool where every thread calls accept on a socket to get the connection the kernel then makes the decision which thread gets the connection and that's why i don't understand multiplexing because i think multiplexing does exactly the same you use select to wait for a connection (or a descriptor to change its state) and then make accept but if this can the kernel do for you what is a multiprocessed, multithreaded multiplexing server good for? or what exactly is a multiplexing server compared with a multiprocesses/multithreaded server? thx@ll

    A 1 Reply Last reply
    0
    • T ThinkingPrometheus

      hiho i read a book about linux networking and it describes some techniques for a server but my question is more about software architecture than linux programming so i post it here 1. multiplexing (select()) 2. multiprocess (fork()) 3. multithreaded (pthread's) i understand the architecture of a process pool in which every process holds a thread pool where every thread calls accept on a socket to get the connection the kernel then makes the decision which thread gets the connection and that's why i don't understand multiplexing because i think multiplexing does exactly the same you use select to wait for a connection (or a descriptor to change its state) and then make accept but if this can the kernel do for you what is a multiprocessed, multithreaded multiplexing server good for? or what exactly is a multiplexing server compared with a multiprocesses/multithreaded server? thx@ll

      A Offline
      A Offline
      Alexander M
      wrote on last edited by
      #2

      Multiplexing is easy. It is a technique to handle multiple sockets with only one thread. You use a loop with a call to select to detect action on every single socket to be able to answer requests for example! This needs less resources than multi-threading or even forking. Don't try it, just do it! ;-)

      T 1 Reply Last reply
      0
      • A Alexander M

        Multiplexing is easy. It is a technique to handle multiple sockets with only one thread. You use a loop with a call to select to detect action on every single socket to be able to answer requests for example! This needs less resources than multi-threading or even forking. Don't try it, just do it! ;-)

        T Offline
        T Offline
        ThinkingPrometheus
        wrote on last edited by
        #3

        but i don't need multiple sockets! i just need to listen on one socket! does it make sense if i only need to listen on one socket?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

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