# a problem in socket programming

**URL:** https://discussions.unity.com/t/a-problem-in-socket-programming/415774
**Category:** Scripting
**Tags:** Scripting
**Created:** [June 13, 2010, 8:11pm UTC](https://discussions.unity.com/t/a-problem-in-socket-programming/415774 "2010-06-13T20:11:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![anon\_72228462](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@anon\_72228462](https://discussions.unity.com/u/anon_72228462)
#### Post date: [June 13, 2010, 8:11pm UTC](https://discussions.unity.com/t/a-problem-in-socket-programming/415774/1 "2010-06-13T20:11:44Z")

</div>

Hi,

i wrote a server/client program.i send some random numbers(x,y) via server to client and when i get this numbers in client(unity) i want instantiate a bullet in this numbers(x,y) that i get.i can do all of thats but when i instantiate the bullet the unity will crach.

please first run the server and the client.

so thanks.

[326222–11503–$bug\_197.zip](https://discussions.unity.com/uploads/short-url/nK3HeQs4KfclD92lx9oInWnwwZ8.zip) (1.05 MB)

---

<div class="post-metadata">

### Author: ![anon\_72228462](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@anon\_72228462](https://discussions.unity.com/u/anon_72228462)
#### Post date: [June 14, 2010, 4:26am UTC](https://discussions.unity.com/t/a-problem-in-socket-programming/415774/2 "2010-06-14T04:26:53Z")

</div>

In addition,i get this error message:

m\_ThreadCheck !Thread::EqualsCurrentThreadID(m\_ThreadID)

i thinks unity is not Thread safe!!

what is your idea?

please help.
