# ServerSocket Behavior

**URL:** <https://forum.xojo.com/t/serversocket-behavior/12365>\
**Category:** General\
**Created:** [November 16, 2013, 6:34pm UTC](https://forum.xojo.com/t/serversocket-behavior/12365 "2013-11-16T18:34:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gary\_McGuire](https://forum.xojo.com/user_avatar/forum.xojo.com/gary_mcguire/32/5607_2.png) [@Gary\_McGuire](https://forum.xojo.com/u/Gary_McGuire)\
**Post date:** [November 16, 2013, 6:34pm UTC](https://forum.xojo.com/t/serversocket-behavior/12365/1 "2013-11-16T18:34:38Z")

</div>

I’m starting to try to work with ServerSockets as a way to connect computers on the local network. In running the example project ServerSocketServerTest, after hitting Listen, it arbitrarily creates 12 sockets.

I don’t understand this behavior. I would think it would create none until another computer connects with the ServerSocket. Can anyone tell me what I’m missing here?

---

<div class="post-metadata">

**Author:** ![Brad\_Hutchings](https://forum.xojo.com/user_avatar/forum.xojo.com/brad_hutchings/32/143_2.png) [@Brad\_Hutchings](https://forum.xojo.com/u/Brad_Hutchings)\
**Post date:** [November 16, 2013, 6:38pm UTC](https://forum.xojo.com/t/serversocket-behavior/12365/2 "2013-11-16T18:38:12Z")

</div>

It creates a pool so they are ready. As clients connect, the connections are handed off to these sockets.

---

<div class="post-metadata">

**Author:** ![Gary\_McGuire](https://forum.xojo.com/user_avatar/forum.xojo.com/gary_mcguire/32/5607_2.png) [@Gary\_McGuire](https://forum.xojo.com/u/Gary_McGuire)\
**Post date:** [November 16, 2013, 6:42pm UTC](https://forum.xojo.com/t/serversocket-behavior/12365/3 "2013-11-16T18:42:24Z")

</div>

Thanks. Do you happen to know why 12? Is that something I can set? Does it change as more requests are made?

---

<div class="post-metadata">

**Author:** ![Brad\_Hutchings](https://forum.xojo.com/user_avatar/forum.xojo.com/brad_hutchings/32/143_2.png) [@Brad\_Hutchings](https://forum.xojo.com/u/Brad_Hutchings)\
**Post date:** [November 16, 2013, 7:19pm UTC](https://forum.xojo.com/t/serversocket-behavior/12365/4 "2013-11-16T19:19:07Z")

</div>

That would be the MinSocketsAvailable property. Read up on the class here:

[http://documentation.xojo.com/index.php?title=ServerSocket&oldid=44849](http://documentation.xojo.com/index.php?title=ServerSocket&oldid=44849)

I think the theory behind this is that a pre-allocated socket should be able to respond faster and the ServerSocket should be able to handle multiple incoming connections simultaneously.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 4:56pm UTC](https://forum.xojo.com/t/serversocket-behavior/12365/5 "2020-10-29T16:56:27Z")

</div>


