You can use Sockets or Socket based connections in the webplayer, but you have to provide a crossdomain server on port 843 which returns a crossdomain policy. You can use a different port, but in this case you have to fetch the policy manually with Security.PrefetchSocketPolicy.
See the webplayer security sandbox page for more details.
Note: There is a simple socket server included in your Unity installation. Take a look into this folder:
answered May 28 '12 at 12:23 PM