Dan, where's the error..? On what line does it give you an object not set error..?
...Note a couple things...
1 - you never use your ClientsList array .. which is fine if you don't need it, but why declare it?
2 - You receive only a single packet, and then the connection goes into oblivion (not closed, just can't ever be accessed again). ...In your OnReceive, make another call to BeginReceive
3 - In your EndReceive, you should look at it's return value - that's the number of bytes it read. "int numbytes = clientSocket.BeginReceive(ar)" ... because the buffer you use is a byte[1024] - but you're not going to receive 1024 bytes of data, you're going to receive however many random bytes you happened to receive in a single packet (which you can TRY to control, but can't).
4 - ASCIIEncoding.ASCII.GetString(byteData) is working on the ENTIRE byte[1024]... instead of just the number of bytes you actually received. You shold change it to work on only however many bytes you receive. There's an overload for it, I think GetString(byteData, 0, NumBytes); or something like that.
---------- Post added at 10:07 AM ---------- Previous post was at 10:05 AM ----------
5 - Just a FYI, you're only binding to 127.0.0.1, meaning you can only connect to yourself using the 127.0.0.1 IP... If you want to bind to any ip, use IPAddress.Any