Thread: passing a connection to another process.

  1. #1
    zsaniK Kinasz's Avatar
    Join Date
    Jan 2003
    Posts
    222

    passing a connection to another process.

    Is it possible to pass an open connection to another process. eg:


    Process 1 receives connection. Adds connection to que. Notifies process 2. Resumes listening for connections.


    Process 2 gets connections out of the que, and works on them.

    Is this possible or is a connection limited to the process that made it ? If it is possible, what is the best way of passing the open connection, I am thinking shared memory location?
    "Assumptions are the mother of all **** ups!"

  2. #2
    Registered User
    Join Date
    Feb 2003
    Posts
    175
    Firstly, What OS are you using?

    If it is Windows OS, why can't you go for multithreded application. One thread will listen and other thread will process the packet.

    Once listening thread receives packets then it can set the event to signal the the thread waiting for signal.

    Let me know, if this help. Otherwise let me know your question specifics.

  3. #3
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Is it possible to pass an open connection to another process.
    Yes it's possible

  4. #4
    zsaniK Kinasz's Avatar
    Join Date
    Jan 2003
    Posts
    222
    awesome, thanks guys.
    I think I will go for the multithreaded method. I have to get this app working for linux and windows so after a bit of searching I am thinking POSIX threads.

    Cheers
    "Assumptions are the mother of all **** ups!"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Check number of times a process is running
    By linuxwolf in forum Windows Programming
    Replies: 6
    Last Post: 10-17-2008, 11:08 AM
  2. Replies: 3
    Last Post: 10-15-2008, 09:24 AM
  3. Process manipulation questions
    By Sfel in forum Windows Programming
    Replies: 7
    Last Post: 05-17-2008, 12:39 PM
  4. restarting process
    By Bleech in forum Windows Programming
    Replies: 3
    Last Post: 11-29-2007, 02:07 AM
  5. Problem with forking a process
    By Unitedroad in forum C Programming
    Replies: 10
    Last Post: 10-04-2007, 01:43 AM