# Making a server in draw()

**URL:** <https://discourse.processing.org/t/making-a-server-in-draw/20319>\
**Category:** Libraries\
**Created:** [April 30, 2020, 7:19pm UTC](https://discourse.processing.org/t/making-a-server-in-draw/20319 "2020-04-30T19:19:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kikomali2517](https://avatars.discourse-cdn.com/v4/letter/k/e95f7d/32.png) [@kikomali2517](https://discourse.processing.org/u/kikomali2517)\
**Post date:** [April 30, 2020, 7:19pm UTC](https://discourse.processing.org/t/making-a-server-in-draw/20319/1 "2020-04-30T19:19:48Z")

</div>

I know that you can make [servers](https://processing.org/reference/libraries/net/Server.html) in setup but I am wondering if you can make or initialize them in draw. I want to make a game that will connect me and my friends on a network. The thing is I want the user to choose if they are hosting or joining a game beforehand and then initializing a client or a server depending on the chosen option. I have tried putting `server = new Server(this, port);` in draw but it gives me:

`The constructor Server(BomberMultiplayer.Game, int) is undefined`

Also the server waits for a connection without calling the next draw() so I get a blank screen until it connects. I would like to show a “waiting” animation instead.

---

<div class="post-metadata">

**Author:** ![kikomali2517](https://avatars.discourse-cdn.com/v4/letter/k/e95f7d/32.png) [@kikomali2517](https://discourse.processing.org/u/kikomali2517)\
**Post date:** [May 1, 2020, 3:03pm UTC](https://discourse.processing.org/t/making-a-server-in-draw/20319/2 "2020-05-01T15:03:42Z")

</div>

Nevermind. I have found the solution. I am using [oscP5](http://www.sojamo.de/libraries/oscP5/) now.
