# How to manage multiple connections from a server socket ?

**URL:** <https://discourse.julialang.org/t/how-to-manage-multiple-connections-from-a-server-socket/18657>\
**Category:** General Usage\
**Tags:** question\
**Created:** [December 14, 2018, 2:06pm UTC](https://discourse.julialang.org/t/how-to-manage-multiple-connections-from-a-server-socket/18657 "2018-12-14T14:06:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![simoes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simoes/32/6436_2.png) [@simoes](https://discourse.julialang.org/u/simoes)\
**Post date:** [December 14, 2018, 2:06pm UTC](https://discourse.julialang.org/t/how-to-manage-multiple-connections-from-a-server-socket/18657/1 "2018-12-14T14:06:48Z")

</div>

Hi there.

I need to make a server at julia, but i can’t find a way to receive multiple connections in parallel to my communication code.

In the code below:

1. The server is capable to receive connections outside the @async block;
2. Julia prints an invalid connection server inside the @async block.

```julia
using Sockets
server = listen( 4000 )
frame_idx = 10000

println( "waiting for clients ... " )	

@async while true
	global server

	println( server )
	client = accept( server )
	println( "client connected with id ", client )
end

```

Any suggestions to solve this issue ?  
Best regards.
