That seems reasonable. I see nothing about working with "ephemeral ports" 
in the node/iojs docs, but suspect server.listen(0) (which listens on a 
"random" port) and then then connecting to whatever's in server.address() 
would be the way to do that. Assuming there isn't a better way I'll give 
that a try.

Thanks!

On Tuesday, June 30, 2015 at 12:29:59 PM UTC-6, Ryan Graham wrote:
>
> If you only plan on using it from within the process, you could use an 
> ephemeral port binding, which shouldn't "tie up" a useful TCP port.
>
> ~Ryan
>
> On Tue, 30 Jun 2015 at 09:02 Greg Reimer <g...@wayin.com <javascript:>> 
> wrote:
>
>> Basically, it would be nice to be able to create a server object that I 
>> could have in memory and connect to directly (for proxying purposes) 
>> *without* tying up a socket file or a TCP port.
>>
>> I've been looking for a way to do this for a while actually, and it seems 
>> like it should be possible in principle, but have had no luck finding an 
>> example. Maybe it simply isn't possible?
>>
>> Thanks,
>> Greg
>>
>> -- 
>> Job board: http://jobs.nodejs.org/
>> New group rules: 
>> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
>> Old group rules: 
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "nodejs" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to nodejs+un...@googlegroups.com <javascript:>.
>> To post to this group, send email to nod...@googlegroups.com 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/nodejs/58d97f08-1794-4a11-a5e5-56ed710579fe%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/nodejs/58d97f08-1794-4a11-a5e5-56ed710579fe%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/dd317b95-134b-4e31-80be-02192ac63821%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to